projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96e3c0b
)
* html_to_ascii(): don't buffer underrun while checking whether we should append...
author
Wilfried Göesgens
<willi@citadel.org>
Thu, 25 Mar 2010 22:53:51 +0000
(22:53 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Thu, 25 Mar 2010 22:53:51 +0000
(22:53 +0000)
libcitadel/lib/html_to_ascii.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/html_to_ascii.c
b/libcitadel/lib/html_to_ascii.c
index 90d1103f56e5dbfc629c4c2ca52268978d720b0a..86cbdedeed4574c0fb0f8e67de99354e06644f5e 100644
(file)
--- a/
libcitadel/lib/html_to_ascii.c
+++ b/
libcitadel/lib/html_to_ascii.c
@@
-570,7
+570,7
@@
char *html_to_ascii(char *inputmsg, int msglen, int screenwidth, int do_citaform
--output_len;
}
- if (
outptr[output_len-1] != '\n'
) {
+ if (
(output_len > 0) && (outptr[output_len-1] != '\n')
) {
strcat(outptr, "\n");
++output_len;
}