[Bug 783] dpkg.c dot-directory extraction bug

bugzilla at busybox.net bugzilla at busybox.net
Fri Jan 8 17:07:20 UTC 2010


https://bugs.busybox.net/show_bug.cgi?id=783





--- Comment #1 from Denys Vlasenko <vda.linux at googlemail.com>  2010-01-08 17:07:19 UTC ---
Your patch will mishandle ".name" by treating it like "name".

How about this?

-       name_ptr += strspn(name_ptr, "./");
+       /* Skip all leading "/" */
+       while (*name_ptr == '/')
+               name_ptr++;
+       /* Skip all leading "./" and "../" */
+       while (name_ptr[0] == '.') {
+               if (name_ptr[1] == '.' && name_ptr[2] == '/')
+                       name_ptr++;
+               if (name_ptr[1] != '/')
+                       break;
+               name_ptr += 2;
+       }


-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list