mirror of git://git.sv.gnu.org/nano.git
in do_alt_speller(), if we can't invoke the spell checker, use sprintf()
instead of snprintf() to write the error string we return, as altspell_error will always be long enough to hold it git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2813 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
658f7e6630
commit
892396bb7d
|
@ -9,6 +9,9 @@ CVS code -
|
||||||
- Rename variable msglen to msg_len, for consistency, and make
|
- Rename variable msglen to msg_len, for consistency, and make
|
||||||
it a size_t instead of an int. Also remove unnecessary
|
it a size_t instead of an int. Also remove unnecessary
|
||||||
initialization of altspell_error. (DLR)
|
initialization of altspell_error. (DLR)
|
||||||
|
- If we can't invoke the spell checker, use sprintf() instead of
|
||||||
|
snprintf() to write the error string we return, as
|
||||||
|
altspell_error will always be long enough to hold it. (DLR)
|
||||||
allow_pending_sigwinch()
|
allow_pending_sigwinch()
|
||||||
- Simplify by using the "?" operator instead of an if clause.
|
- Simplify by using the "?" operator instead of an if clause.
|
||||||
(DLR)
|
(DLR)
|
||||||
|
|
|
@ -2409,7 +2409,7 @@ const char *do_alt_speller(char *tempfile_name)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
altspell_error = charalloc(msg_len);
|
altspell_error = charalloc(msg_len);
|
||||||
snprintf(altspell_error, msg_len, invoke_error, alt_speller);
|
sprintf(altspell_error, invoke_error, alt_speller);
|
||||||
return altspell_error;
|
return altspell_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue