[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src log_window.c,1.20,1.21
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src log_window.c,1.20,1.21 |
Date: |
Wed, 12 Mar 2003 09:17:15 -0500 |
Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv4275/src
Modified Files:
log_window.c
Log Message:
Fix a buffer overflow found by Yann
Index: log_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/log_window.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- log_window.c 4 Mar 2003 16:47:51 -0000 1.20
+++ log_window.c 12 Mar 2003 14:17:13 -0000 1.21
@@ -141,8 +141,8 @@
/* if html tags are in the buffer, gotta strip the last two tags */
if ((p2 = strstr(read_buffer, "</B>")) != NULL) {
- strncpy(date_buffer, p1, p2 - p1);
- date_buffer[p2-p1] = '\0';
+ strncpy(date_buffer, p1, (p2 - p1) > 127 ? 127:(p2-p1));
+ date_buffer[(p2 - p1) > 127 ? 127:(p2-p1)] = '\0';
} else {
/* eww, c's string handling sucks */
strncpy(date_buffer, p1, (read_buffer + strlen(read_buffer)) - p1);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src log_window.c,1.20,1.21,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.322,1.323 configure.in,1.317,1.318
- Next by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.323,1.324 configure.in,1.318,1.319
- Previous by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.322,1.323 configure.in,1.317,1.318
- Next by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.323,1.324 configure.in,1.318,1.319
- Index(es):