| Anonymous | Login | Signup for a new account | 11-10-2008 12:37 PST |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0004464 | [BusyBox] Other | crash | always | 08-04-08 20:13 | 08-06-08 01:44 | ||||
| Reporter | rockeychu | View Status | public | ||||||
| Assigned To | BusyBox | ||||||||
| Priority | normal | Resolution | fixed | ||||||
| Status | closed | Product Version | svn | ||||||
| Summary | 0004464: xrealloc_vector_helper function in xrealloc_vector.c misuses void pointer "vector" | ||||||||
| Description |
Variable vector is misused and set zero erroneously. This bug may cause every applet which calls function of xrealloc_vector crashed, such as modprobe, insmod, ..., etc. Patch as following: Index: libbb/xrealloc_vector.c =================================================================== --- libbb/xrealloc_vector.c (revision 23044) +++ libbb/xrealloc_vector.c (working copy) @@ -39,8 +39,7 @@ if (!(idx & (mask - 1))) { sizeof_and_shift >>= 8; /* sizeof(vector[0]) */ vector = xrealloc(vector, sizeof_and_shift * (idx + mask + 1)); - vector += idx; - memset(vector, 0, sizeof_and_shift * (mask + 1)); + memset(vector + sizeof_and_shift * idx, 0, sizeof_and_shift * (mask + 1)); } return vector; } |
||||||||
| Additional Information | |||||||||
| Attached Files | |||||||||
|
|
|||||||||
| Copyright © 2000 - 2006 Mantis Group |