зеркало из https://github.com/mozilla/gecko-dev.git
Bug 191712 nsDateTimeFormatUnix returns an uninitialized value in an error case
r=smontagu sr=alecf
This commit is contained in:
Родитель
5d62c94573
Коммит
fc3928b29e
|
@ -194,7 +194,6 @@ nsresult nsDateTimeFormatUnix::FormatTMTime(nsILocale* locale,
|
||||||
const struct tm* tmTime,
|
const struct tm* tmTime,
|
||||||
nsString& stringOut)
|
nsString& stringOut)
|
||||||
{
|
{
|
||||||
NS_ENSURE_TRUE(mDecoder, NS_ERROR_NOT_INITIALIZED);
|
|
||||||
#define NSDATETIME_FORMAT_BUFFER_LEN 80
|
#define NSDATETIME_FORMAT_BUFFER_LEN 80
|
||||||
char strOut[NSDATETIME_FORMAT_BUFFER_LEN*2]; // buffer for date and time
|
char strOut[NSDATETIME_FORMAT_BUFFER_LEN*2]; // buffer for date and time
|
||||||
char fmtD[NSDATETIME_FORMAT_BUFFER_LEN], fmtT[NSDATETIME_FORMAT_BUFFER_LEN];
|
char fmtD[NSDATETIME_FORMAT_BUFFER_LEN], fmtT[NSDATETIME_FORMAT_BUFFER_LEN];
|
||||||
|
@ -203,6 +202,7 @@ nsresult nsDateTimeFormatUnix::FormatTMTime(nsILocale* locale,
|
||||||
|
|
||||||
// set up locale data
|
// set up locale data
|
||||||
(void) Initialize(locale);
|
(void) Initialize(locale);
|
||||||
|
NS_ENSURE_TRUE(mDecoder, NS_ERROR_NOT_INITIALIZED);
|
||||||
|
|
||||||
// set date format
|
// set date format
|
||||||
switch (dateFormatSelector) {
|
switch (dateFormatSelector) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче