I suspect we’ll just remove it, but I want to give the other developers a
chance to chime in before doing so.
> On Dec 12, 2014, at 6:07 PM, Paul Hargrove wrote:
>
> Ralph,
>
> If preserved at all, the existing code should probably be made to act more
> intelligently when it encounters an unk
Ralph,
If preserved at all, the existing code should probably be made to act more
intelligently when it encounters an unknown escape code. I would suggest
advancing the length by some value (say 128?) that should be "big enough"
and printing a prominent warning. So, the next time this bug surfac
Looking at the comments in the code, it appears that the rationale when written
was to provide support for REALLY ancient systems that didn’t have some of
these functions. Since that time, we added a configure check for vsnprintf, so
I’m adding Paul/Larry’s suggested code, protected by that conf
On 12 Dec 2014, at 5:22 PM, Paul Hargrove wrote:
> HOWEVER, while the patch catches the "%u" case, there are plenty of potential
> ways to hit the same problem if, for instance, one uses "%zu" for size_t.
> Additionally, I've already noted that the code for "%ld", "%lx", "%lX", "%lf"
> are all
Or, slightly modified using a defensive coding style:
> return 1 + vsnprintf(dummy, sizeof( dummy ), fmt, ap);
if you like sizeof() [which I prefer]. if you like sizeof:
> return 1 + vsnprintf(dummy, sizeof dummy, fmt, ap);
>
Larry Baker
US Geological Survey
650-329-5608
ba...@usgs.gov
It’s a fair question - that code is ancient, however, so I’m surprised it has
only surfaced now as a problem. I can take a look at making the change
> On Dec 12, 2014, at 5:22 PM, Paul Hargrove wrote:
>
> OK, applying my attached patch (based on Gilles's observation) resolved the
> problem!
>
OK, applying my attached patch (based on Gilles's observation) resolved the
problem!
So I fully expect Ralph's plan to use "%d" to also resolve this.
HOWEVER, while the patch catches the "%u" case, there are plenty of
potential ways to hit the same problem if, for instance, one uses "%zu" for
size
Crud - sorry for delayed response. I was out for a bit.
I’ll just change it to %d as there is nothing magic about it being unsigned.
How bizarre.
> On Dec 12, 2014, at 3:21 PM, Paul Hargrove wrote:
>
> NOTE:
>
> The existing code for "%l." in guess_strlen() is garbage.
> The va_arg() macro c
NOTE:
The existing code for "%l." in guess_strlen() is garbage.
The va_arg() macro calls all have "int" for the type!!
I am *only* testing a fix for the missing "%u" at the moment.
-Paul
On Fri, Dec 12, 2014 at 3:14 PM, Paul Hargrove wrote:
> Thanks, Gilles!
>
> I was looking at that same cod
Thanks, Gilles!
I was looking at that same code just now and completely missed the lack of
a case for '%u' (and '%lu'). I will add one now and see if that resolves
the problem
-Paul
On Fri, Dec 12, 2014 at 3:10 PM, Gilles Gouaillardet <
gilles.gouaillar...@gmail.com> wrote:
> Ralph,
>
> I
Ralph,
I cannot find a case for the %u format is guess_strlen
And since the default does not invoke va_arg()
I
it seems strlen is invoked on nnuma instead of arch
Makes sense ?
Cheers,
Gilles
Ralph Castain wrote:
>Afraid I’m drawing a blank, Paul - I can’t see how we got to a bad address
>do
11 matches
Mail list logo