[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash in 'find_and_set_default_shell()'

From: Eli Zaretskii
Subject: Re: Crash in 'find_and_set_default_shell()'
Date: Sun, 19 Jun 2022 16:47:17 +0300

> From: Paul Smith <psmith@gnu.org>
> Cc: gvanem@online.no, bug-make@gnu.org
> Date: Sun, 19 Jun 2022 09:23:41 -0400
> As best as I recall, the non-standard part of the old snprintf() was
> that it returned -1 if the buffer wasn't large enough, rather than the
> number of chars that would be needed.
> The change made here doesn't rely on that behaviour.
> However I realize now that I need to forcibly add a nul terminator
> because the old snprintf() on Windows didn't nul-terminate the string
> if the buffer wasn't large enough.
> Maybe I'll just punt on that and simply allocate a large-enough buffer.
> Were there other differences in old snprintf()?

The above two, plus the fact that it doesn't support the newer format
specifiers, like %z etc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]