openbsd-ports/security/logsurfer/patches/patch-src_logsurfer_c

13 lines
511 B
Plaintext
Raw Normal View History

$OpenBSD: patch-src_logsurfer_c,v 1.3 2012/08/25 10:07:26 sthen Exp $
--- src/logsurfer.c.orig Mon Sep 5 10:35:08 2011
+++ src/logsurfer.c Thu Aug 23 10:50:53 2012
@@ -458,7 +458,7 @@ main(argc, argv)
*/
logline_buffer_size=4096;
logline_buffer_pos=0;
- if ( (logline_buffer=(char *)malloc(logline_buffer_size)) == NULL ) {
+ if ( (logline_buffer=(char *)calloc(logline_buffer_size,sizeof(char))) == NULL ) {
(void) fprintf(stderr, "unable to allocate memory for logline_buffer\n");
exit(99);
}