Anonymous | Login | Signup for a new account | 11-10-2008 13:51 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 | ||||
0005824 | [BusyBox] Other | crash | always | 10-29-08 06:51 | 11-01-08 17:41 | ||||
Reporter | rockeychu | View Status | public | ||||||
Assigned To | BusyBox | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | svn | ||||||
Summary | 0005824: Since version 23530 with lineedit.c, "fdisk" & "ed" can't work any more | ||||||||
Description |
The reason is: The function read_line_input() declared as: int FAST_FUNC read_line_input(const char *prompt, char *command, int maxsize, line_input_t *st) But, when "fdisk" or "ed" calls read_line_input() with last param "st" set as NULL, variable "state" will set as "(line_input_t*)&const_int_0" witch just as "const int const_int_0 = 0", so, line 1418 will cause Segmentation fault. Patch as following: Index: libbb/lineedit.c =================================================================== --- libbb/lineedit.c (revision 23852) +++ libbb/lineedit.c (working copy) @@ -1415,7 +1415,8 @@ if ((state->flags & SAVE_HISTORY) && state->hist_file) load_history(state->hist_file); #endif - state->cur_history = state->cnt_history; + if (state->flags) + state->cur_history = state->cnt_history; /* prepare before init handlers */ cmdedit_y = 0; /* quasireal y, not true if line > xt*yt */ |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Notes | |
(0014794) timtim 11-01-08 15:56 |
I have this in 1.11.3 and this suggested fix works. |
(0014824) vda 11-01-08 17:41 |
Fixed in rev 23898. Thanks |
Copyright © 2000 - 2006 Mantis Group |