root/trunk/texinfo/texinfo-4.7-segfault-1.patch
| Revision 624, 5.8 kB (checked in by jim, 4 years ago) |
|---|
-
texinfo-4.7/info/echo-area.c
old new 936 936 printf_to_message_buffer (completions_found_index == 1 937 937 ? (char *) _("One completion:\n") 938 938 : (char *) _("%d completions:\n"), 939 (void *) completions_found_index, NULL, NULL);939 (void*)((intptr_t)completions_found_index), NULL, NULL); 940 940 941 941 /* Find the maximum length of a label. */ 942 942 for (i = 0; i < completions_found_index; i++) … … 1499 1499 for input or a couple of seconds, whichever comes first. Then flush the 1500 1500 informational message that was printed. */ 1501 1501 void 1502 inform_in_echo_area (c har *message)1502 inform_in_echo_area (const char *message) 1503 1503 { 1504 registerint i;1504 int i; 1505 1505 char *text; 1506 int avail = EA_MAX_INPUT + 1 - input_line_end; 1506 1507 1507 1508 text = xstrdup (message); 1508 for (i = 0; text[i] && text[i] != '\n' ; i++)1509 for (i = 0; text[i] && text[i] != '\n' && i < avail; i++) 1509 1510 ; 1510 1511 text[i] = 0; 1511 1512 -
texinfo-4.7/info/echo-area.h
old new 33 33 killed some text. */ 34 34 extern int echo_area_last_command_was_kill; 35 35 36 extern void inform_in_echo_area (c har *message);36 extern void inform_in_echo_area (const char *message); 37 37 extern void echo_area_inform_of_deleted_window (WINDOW *window); 38 38 extern void echo_area_prep_read (void); 39 39 extern VFunction *ea_last_executed_command; -
texinfo-4.7/info/filesys.c
old new 281 281 if (!string || i >= strlen (string)) 282 282 return NULL; 283 283 284 if (!string[i]) /* end of string */ 285 return NULL; 286 284 287 /* Advance to next PATH_SEP. */ 285 288 while (string[i] && string[i] != PATH_SEP[0]) 286 289 i++; 287 290 288 if (!string[i] && i == start) /* end of string, and didn't advance */289 return NULL;290 291 291 { 292 292 char *value = xmalloc ((i - start) + 1); 293 293 strncpy (value, &string[start], (i - start)); -
texinfo-4.7/info/infokey.c
old new 639 639 { 640 640 syntax_error (filename, lnum, 641 641 (char *) _("NUL character (^%c) not permitted"), 642 (void *) c, NULL, NULL, NULL);642 (void *)((intptr_t)c), NULL, NULL, NULL); 643 643 error = 1; 644 644 } 645 645 seqstate = normal; … … 663 663 if (alen == 0) 664 664 { 665 665 syntax_error (filename, lnum, (char *) _("missing action name"), 666 (void *) c, NULL, NULL, NULL);666 (void *)((intptr_t)c), NULL, NULL, NULL); 667 667 error = 1; 668 668 } 669 669 else -
texinfo-4.7/info/infomap.c
old new 704 704 map['H'].function = info_get_help_window; 705 705 map['i'].function = info_index_search; 706 706 map['I'].function = info_goto_invocation_node; 707 map['j'].function = info_ down_line;708 map['k'].function = info_ up_line;707 map['j'].function = info_next_line; 708 map['k'].function = info_prev_line; 709 709 map['l'].function = info_history_node; 710 710 map['m'].function = info_menu_item; 711 711 map['n'].function = info_search_next; … … 1182 1182 'H', NUL, A_info_get_help_window, 1183 1183 'i', NUL, A_info_index_search, 1184 1184 'I', NUL, A_info_goto_invocation_node, 1185 'j', NUL, A_info_ down_line,1186 'k', NUL, A_info_ up_line,1185 'j', NUL, A_info_next_line, 1186 'k', NUL, A_info_prev_line, 1187 1187 'l', NUL, A_info_history_node, 1188 1188 'm', NUL, A_info_menu_item, 1189 1189 'n', NUL, A_info_search_next, -
texinfo-4.7/info/session.c
old new 962 962 same as the first menu item found in this node. */ 963 963 window_message_in_echo_area 964 964 ((char *) _("Moving Up %d time(s), then Next."), 965 (void *) up_counter, NULL);965 (void *)((intptr_t)up_counter), NULL); 966 966 967 967 info_handle_pointer ("Next", window); 968 968 return; … … 1944 1944 DECLARE_INFO_COMMAND (info_menu_digit, _("Select this menu item")) 1945 1945 { 1946 1946 register int i, item; 1947 register REFERENCE * entry = NULL, **menu;1947 register REFERENCE **menu; 1948 1948 1949 1949 menu = info_menu_of_node (window->node); 1950 1950 … … 1962 1962 for (i = 0; menu[i + 1]; i++); 1963 1963 else 1964 1964 { 1965 for (i = 0; (entry = menu[i]); i++)1965 for (i = 0; menu[i]; i++) 1966 1966 if (i == item - 1) 1967 1967 break; 1968 1968 } … … 1970 1970 if (menu[i]) 1971 1971 { 1972 1972 info_select_reference (window, menu[i]); 1973 if ( entry->line_number > 0)1974 info_next_line (window, entry->line_number - 1, key);1973 if (menu[i]->line_number > 0) 1974 info_next_line (window, menu[i]->line_number - 1, key); 1975 1975 } 1976 1976 else 1977 1977 info_error ((char *) _("There aren't %d items in this menu."), 1978 (void *) item, NULL);1978 (void *)((intptr_t)item), NULL); 1979 1979 1980 1980 info_free_references (menu); 1981 1981 return;
Note: See TracBrowser for help on using the browser.
