[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev Bug in LYmail.c
From: |
Gisle Vanem |
Subject: |
lynx-dev Bug in LYmail.c |
Date: |
Tue, 1 Sep 1998 18:11:42 +0200 (CEST) |
I think I've discovered a buffer bug in LYmail.c; reply_by_mail();
The `user_input' buffer gets trashed somehow before calling system().
I know _statusline() is a macro, but how can it affect the `user_input'
variable ? I'm compiling for DOS + djgpp 2.01.
I had to add some CTRACE() to find this bug; The trace shows:
[..]
LYCloseTempFP
reply_by_mail() 1: '4dos /c q c:\temp\113092.txt'
reply_by_mail() 2: '0^Ó^X`1ggð2rú`3GIð4RÜ`5'+ð62¾`7^G
ð8^[Ú.....', errno = 14
Alert!: Error spawning editor, check your editor definition in the options
menu
[..]
Anybody else experienced this? Someone try to insert the CTRACE() as show
below. The diff is agains 2.8.1 dev-24.
diff -B -H -u0 lymail.c~ lymail.c
--- lymail.c~ Sat Aug 15 15:57:56 1998
+++ lymail.c Tue Sep 1 17:36:48 1998
@@ -1562,3 +1562,5 @@
- sprintf(user_input, "%s%s %s", editor, editor_arg, my_tmpfile);
- _statusline(SPAWNING_EDITOR_FOR_MAIL);
- stop_curses();
+ sprintf(user_input, "%s%s %s", editor, editor_arg, my_tmpfile);
+ CTRACE(tfp,"reply_by_mail() 1: '%s'", user_input);
+ _statusline(SPAWNING_EDITOR_FOR_MAIL);
+ stop_curses();
+ CTRACE(tfp,"reply_by_mail() 2: '%s'", user_input);
if (system(user_input)) {
@@ -1567,2 +1569,3 @@
- start_curses();
- HTAlert(ERROR_SPAWNING_EDITOR);
+ CTRACE(tfp,", errno = %d", errno);
+ start_curses();
+ HTAlert(ERROR_SPAWNING_EDITOR);
Gisle V.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev Bug in LYmail.c,
Gisle Vanem <=