Skip to content

Commit

Permalink
Fix NULL deref on scan_option.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwsw committed Mar 9, 2000
1 parent 6a9b804 commit 5a81e6f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ main(argc, argv)
init_charset();
init_line();
init_option();
scan_option(save(lgetenv("LESS")));
s = lgetenv("LESS");
if (s != NULL)
scan_option(save(s));

#define isoptstring(s) (((s)[0] == '-' || (s)[0] == '+') && (s)[1] != '\0')
while (argc > 0 && (isoptstring(*argv) || isoptpending()))
Expand Down
5 changes: 4 additions & 1 deletion version.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,9 @@ v349 1/24/00 Fix minor DJGPP bugs; check environment vars for UTF-8;
add --with-editor (thanks to Eli, Markus Kuhn, Thomas Schoepf).
v350 3/1/00 Fix clear-while-standout bug.
v351 3/5/00 Change -M and = prompts to show top & bottom line number.
Posted to Web page.
-----------------------------------------------------------------
v352 3/8/00 Fix scan_option NULL dereference.
*/

char version[] = "351";
char version[] = "352";

0 comments on commit 5a81e6f

Please sign in to comment.