INN commit: trunk/authprogs (ident.c)
INN Commit
rra at isc.org
Sun Jun 14 10:05:50 UTC 2015
Date: Sunday, June 14, 2015 @ 03:05:50
Author: iulius
Revision: 9893
ident: avoid buffer underrun
Thanks to Richard Kettlewell for the patch.
Modified:
trunk/authprogs/ident.c
---------+
ident.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Modified: ident.c
===================================================================
--- ident.c 2015-06-14 10:05:22 UTC (rev 9892)
+++ ident.c 2015-06-14 10:05:50 UTC (rev 9893)
@@ -110,7 +110,7 @@
got++;
} while (buf[got] != '\n');
buf[got] = '\0';
- if (buf[got-1] == '\r')
+ if (got > 0 && buf[got-1] == '\r')
buf[got-1] = '\0';
/* buf now contains the entire ident response. */
More information about the inn-committers
mailing list