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

* Re: [patch] fix wrong argument for calloc
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Ingo Schwarze @ 2013-05-18 16:45 UTC (permalink / raw)
  To: tech; +Cc: uqs

Hi Ulrich,

Ulrich Spörlein wrote on Fri, May 17, 2013 at 02:29:10AM +0200:

> simple patch, please commit.

Done, both to bsd.lv and openbsd.org.

> This was found by Coverity Scan CID 978734,

Hummm...  Please bear with my ignorance...
How can anybody do anything with the CID?
Is the CID really useful without a project ID?
Is there a database somewhere on the net?

> please mention that in the commit message.

Done so, too.

Thanks,
  Ingo

> 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;
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

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

* Re: [patch] fix wrong argument for calloc
  2013-05-18 16:45 ` Ingo Schwarze
@ 2013-05-19  1:58   ` Ulrich Spörlein
  2013-05-19 16:11     ` Ingo Schwarze
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Spörlein @ 2013-05-19  1:58 UTC (permalink / raw)
  To: tech

On Sat, 2013-05-18 at 18:45:45 +0200, Ingo Schwarze wrote:
> Hi Ulrich,
> 
> Ulrich Spörlein wrote on Fri, May 17, 2013 at 02:29:10AM +0200:
> 
> > simple patch, please commit.
> 
> Done, both to bsd.lv and openbsd.org.
> 
> > This was found by Coverity Scan CID 978734,
> 
> Hummm...  Please bear with my ignorance...
> How can anybody do anything with the CID?
> Is the CID really useful without a project ID?
> Is there a database somewhere on the net?

Sorry, got to this mail only now. These IDs are unique on
http://scan.coverity.com which is where Open Source projects can sign up
to have Coverity scan their stuff.

The FreeBSD project used to run their own instance of Coverity Prevent
(so with local IDs, not global ones), but I'm trying to get us on the
coverity-run instance, which should scale easier and lessen the
bus-factor on our side.

NetBSD is on there too, maybe OpenBSD should consider doing this as
well.

If you create an account and request access to the FreeBSD project, I
should be able to give that to you. But they currently migrate their
website and some stuff seems broken.

Cheers,
Uli
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

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

* Re: [patch] fix wrong argument for calloc
  2013-05-19  1:58   ` Ulrich Spörlein
@ 2013-05-19 16:11     ` Ingo Schwarze
  0 siblings, 0 replies; 4+ messages in thread
From: Ingo Schwarze @ 2013-05-19 16:11 UTC (permalink / raw)
  To: tech; +Cc: uqs

Hi Ulrich,

Ulrich Spörlein wrote on Sun, May 19, 2013 at 03:58:56AM +0200:
> On Sat, 2013-05-18 at 18:45:45 +0200, Ingo Schwarze wrote:

>> Hummm...  Please bear with my ignorance...
>> How can anybody do anything with the CID?
>> Is the CID really useful without a project ID?
>> Is there a database somewhere on the net?

> Sorry, got to this mail only now. These IDs are unique on
> http://scan.coverity.com which is where Open Source projects
> can sign up to have Coverity scan their stuff.
> 
> The FreeBSD project used to run their own instance of Coverity Prevent
> (so with local IDs, not global ones), but I'm trying to get us on the
> coverity-run instance, which should scale easier and lessen the
> bus-factor on our side.
> 
> NetBSD is on there too,

Ah, thanks for the explanation.

> maybe OpenBSD should consider doing this as well.

Maybe, maybe not, i really have no idea and don't expect to be among
the people deciding that.  I seem to remember some individual
developers using Coverity as one of several tools to do code reviews
in the past, but i'm not aware of any current plans and don't plan
to propose any future ones, either.

> If you create an account

I tried that yesterday, not for OpenBSD work in general, but just
to work on mandoc.  However, sign on failed, telling me to confirm
the account, but i never received the confirmation email, not even
after requesting a resend.  Meanwhile, they apparently have deleted
my account.  Trying to sign on returns "Username doesn't exist...",
which is different from the message i got yesterday.

> and request access to the FreeBSD project, I should be able to give
> that to you. But they currently migrate their website and some stuff
> seems broken.

Yes, it seems so.

Oh well, i guess i am losing interest, i was hesitant to work
with a commercial vendor in the first place, in particular
regarding security-relevant topics.  All the more if the fail
to even maintain their tools in working state...

Of course, you are still very welcome to report any issues you
are aware of, no matter how you found them!

Yours,
  Ingo
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

^ 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).