[tz] defensive value for define on Solaris causes load of timerule to fail

Robert Elz kre at munnari.OZ.AU
Tue Jun 13 01:13:06 UTC 2017

    Date:        Mon, 12 Jun 2017 16:25:56 -0700
    From:        Jonathan Leffler <jonathan.leffler at gmail.com>
    Message-ID:  <CAH+RLGERDa10n6aNpyqoQ60jxWhsK_sWrjLcgykyjhVpwD=HRg at mail.gmail.com>

  | So it's permissible and safe to use:
  |     sprintf(lsp->fullname, "%s/%s", p, name);

Actually in that case, the snprintf is better than either the scrcpy/strcat
version or the sprintf() version, as after this recent change,
sizeof(isp->fullname) (ie: the buffer space available) is based upon
the sizes of other unrelated objects, and perhaps somewhere, on some system
might not be big enough.


ps: All I did right now was read the diffs, so if the size will be guaranteed
to be big enough because of what it is based upon, then fine.

More information about the tz mailing list