]> granicus.if.org Git - procps-ng/commit
libprocps: protect locale environment getting overwrite
authorMichael Schwendt <mschwendt@fedoraproject.org>
Fri, 18 Dec 2009 04:27:21 +0000 (05:27 +0100)
committerCraig Small <csmall@enc.com.au>
Tue, 24 Apr 2012 23:34:41 +0000 (09:34 +1000)
commitdd87e4f48ce8899ba759801548fb7f73bb830971
tree0d2d201960798fa7baa79165db0ea4723883d010
parentcdeb9a071ad2ae56f1395bca75845bfff7c76694
libprocps: protect locale environment getting overwrite

The problem is that in ./proc/sysinfo.c uptime(), it is not
considered that the "savelocale" string is overwritten by the
subsequent call to setlocale().  Hence restoring the locale later on
won't work this way.  "savelocale" ought to be a copy of the string
pointed to by setlocale()'s return-value.

Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=548711
Backported-by: Sami Kerola <kerolasa@iki.fi>
proc/sysinfo.c