mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 402150 prevent crash @nsDocument::RetrieveRelevantHeaders, r=wtc, r/sr=jst, a=beltzner
This commit is contained in:
parent
297e4257d9
commit
ba4c8227d0
@ -46,6 +46,7 @@
|
||||
*/
|
||||
|
||||
#include "plstr.h"
|
||||
#include "prprf.h"
|
||||
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
@ -5332,8 +5333,9 @@ nsDocument::RetrieveRelevantHeaders(nsIChannel *aChannel)
|
||||
PRExplodedTime prtime;
|
||||
PR_ExplodeTime(modDate, PR_LocalTimeParameters, &prtime);
|
||||
// "MM/DD/YYYY hh:mm:ss"
|
||||
char formatedTime[20];
|
||||
if (sprintf(formatedTime, "%02d/%02d/%04d %02d:%02d:%02d",
|
||||
char formatedTime[24];
|
||||
if (PR_snprintf(formatedTime, sizeof(formatedTime),
|
||||
"%02ld/%02ld/%04hd %02ld:%02ld:%02ld",
|
||||
prtime.tm_month + 1, prtime.tm_mday, prtime.tm_year,
|
||||
prtime.tm_hour , prtime.tm_min, prtime.tm_sec)) {
|
||||
CopyASCIItoUTF16(nsDependentCString(formatedTime), mLastModified);
|
||||
|
Loading…
Reference in New Issue
Block a user