balsa r7974 - in trunk: . libbalsa
- From: PeterB svn gnome org
- To: svn-commits-list gnome org
- Subject: balsa r7974 - in trunk: . libbalsa
- Date: Mon, 15 Sep 2008 19:50:54 +0000 (UTC)
Author: PeterB
Date: Mon Sep 15 19:50:54 2008
New Revision: 7974
URL: http://svn.gnome.org/viewvc/balsa?rev=7974&view=rev
Log:
do not trash stack
Modified:
trunk/ChangeLog
trunk/libbalsa/mailbox_mbox.c
Modified: trunk/libbalsa/mailbox_mbox.c
==============================================================================
--- trunk/libbalsa/mailbox_mbox.c (original)
+++ trunk/libbalsa/mailbox_mbox.c Mon Sep 15 19:50:54 2008
@@ -258,7 +258,7 @@
&& strncmp("From ", buffer, 5) == 0;
#if DEBUG_SEEK
if (!retval) {
- buffer[nread] = 0;
+ buffer[MIN(nread, sizeof buffer - 1)] = 0;
g_print("%s at %ld failed: read %ld chars, saw \"%s\"\n", __func__,
(long) offset, (long) nread, buffer);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]