2006-11-02 Hans Petter Jansson <hpj@novell.com>
* camel-mime-filter-tohtml.c (writeln): Prevent potential buffer
overrun by one byte.
* camel-gpg-context.c (gpg_ctx_op_step): Clear the poll structures'
events fields, so we don't pass uninitialized values to poll().
+2006-11-02 Hans Petter Jansson <hpj@novell.com>
+
+ * camel-mime-filter-tohtml.c (writeln): Prevent potential buffer
+ overrun by one byte.
+
+ * camel-gpg-context.c (gpg_ctx_op_step): Clear the poll structures'
+ events fields, so we don't pass uninitialized values to poll().
+
2006-11-02 Harish Krishnaswamy <kharish@novell.com>
* camel-mime-filter-crlf.c (filter): Fixes buffer overrun.
struct pollfd polls[6];
int status, i, cancel_fd;
- for (i=0;i<6;i++)
+ for (i=0;i<6;i++) {
polls[i].fd = -1;
+ polls[i].events = 0;
+ }
if (!gpg->seen_eof1) {
polls[0].fd = gpg->stdout_fd;
/* otherwise, FALL THROUGH */
case ' ':
if (html->flags & CAMEL_MIME_FILTER_TOHTML_CONVERT_SPACES
- && ((inptr == (in + 1) || *inptr == ' ' || *inptr == '\t'))) {
+ && ((inptr == (in + 1) || (inptr < inend && (*inptr == ' ' || *inptr == '\t'))))) {
outptr = g_stpcpy (outptr, " ");
html->column++;
break;