|
From: | Jan Djärv |
Subject: | Re: fix the sscanf usage in etags |
Date: | Thu, 10 Aug 2006 08:47:16 +0200 |
User-agent: | Thunderbird 1.5.0.5 (X11/20060808) |
Kevin Ryde skrev:
Masatake YAMATO <address@hidden> writes:The problem I found was that etags crashed when `#line 123 L"wide"' was given as input. If the crashing can be suppressed, it is enough.That's the only bad case, you don't have some strange libc that incorrectly counts %n? Jan Djärv <address@hidden> writes:if (sscanf (lbp->buffer, "#line %d %n\"", &lno, &start) >= 1 && lbp->buffer[start] == '"')I think that still uses start uninitialized on say "#line 123 ".
No, in that case start will be 10. If the %d matches, sscanf will return 1 and in that case %n must match (whitespace is optional).
Jan D.
[Prev in Thread] | Current Thread | [Next in Thread] |