tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* [patch] fix wrong argument for calloc
@ 2013-05-17  0:29 Ulrich Spörlein
  2013-05-18 16:45 ` Ingo Schwarze
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Spörlein @ 2013-05-17  0:29 UTC (permalink / raw)
  To: tech

[-- Attachment #1: Type: text/plain, Size: 130 bytes --]

Hey,

simple patch, please commit. This was found by Coverity Scan CID 978734,
please mention that in the commit message. Thanks.

[-- Attachment #2: chars.diff --]
[-- Type: text/x-diff, Size: 587 bytes --]

Index: chars.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/chars.c,v
retrieving revision 1.52
diff -u -p -r1.52 chars.c
--- chars.c	8 Nov 2011 00:15:23 -0000	1.52
+++ chars.c	17 May 2013 00:17:18 -0000
@@ -77,7 +77,7 @@ mchars_alloc(void)
 	 */
 
 	tab = mandoc_malloc(sizeof(struct mchars));
-	htab = mandoc_calloc(PRINT_HI - PRINT_LO + 1, sizeof(struct ln **));
+	htab = mandoc_calloc(PRINT_HI - PRINT_LO + 1, sizeof(struct ln *));
 
 	for (i = 0; i < LINES_MAX; i++) {
 		hash = (int)lines[i].code[0] - PRINT_LO;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-19 16:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-17  0:29 [patch] fix wrong argument for calloc Ulrich Spörlein
2013-05-18 16:45 ` Ingo Schwarze
2013-05-19  1:58   ` Ulrich Spörlein
2013-05-19 16:11     ` Ingo Schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).