discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Logic error in mandoc.c time2a()
@ 2011-03-11 20:42 Ulrich Spörlein
  2011-03-12  0:27 ` Ingo Schwarze
  0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Spörlein @ 2011-03-11 20:42 UTC (permalink / raw)
  To: discuss

Hi,

now that the clang/llvm folks unbroke their static analysis tool again,
I had another run on the mdocml sources. Only one bug stood out
(disregard the 'Dead store' class).

See https://www.spoerlein.net/scan-build/mdocml/2011-03-11-1/

In time2a(), 'buf' is a stack-local buffer and its address will be
returned. Oops. Either make it global, static, use malloc/free, or have
the caller provide the buffer, not sure which solution you guys would
prefer.

Uli
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

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

end of thread, other threads:[~2011-03-12  0:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-11 20:42 Logic error in mandoc.c time2a() Ulrich Spörlein
2011-03-12  0:27 ` 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).