[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
shishi/lib gztime.c
From: |
shishi-commit |
Subject: |
shishi/lib gztime.c |
Date: |
Sun, 19 Oct 2003 21:53:32 -0400 |
CVSROOT: /cvsroot/shishi
Module name: shishi
Branch:
Changes by: Simon Josefsson <address@hidden> 03/10/19 21:53:32
Modified files:
lib : gztime.c
Log message:
(shishi_time): Better length check. Don't write out of bounds.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/shishi/shishi/lib/gztime.c.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
Patches:
Index: shishi/lib/gztime.c
diff -u shishi/lib/gztime.c:1.10 shishi/lib/gztime.c:1.11
--- shishi/lib/gztime.c:1.10 Sat Sep 6 15:57:16 2003
+++ shishi/lib/gztime.c Sun Oct 19 21:53:32 2003
@@ -115,13 +115,13 @@
if (res != SHISHI_OK)
return res;
- if (len == GENERALIZEDTIME_TIME_LEN)
+ if (len <= GENERALIZEDTIME_TIME_LEN)
{
shishi_error_printf (handle, "Read time too short (%s)", *time);
return SHISHI_ASN1_ERROR;
}
- (*time)[len] = '\0';
+ (*time)[GENERALIZEDTIME_TIME_LEN] = '\0';
return SHISHI_OK;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- shishi/lib gztime.c,
shishi-commit <=