mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 978851 - LoadInfo::UpdateSystemLoad warns about format string in sscanf. r=padenot
This commit is contained in:
parent
32e2737215
commit
525f2cc8df
@ -9,6 +9,7 @@
|
||||
#include "prtime.h"
|
||||
#include "prinrval.h"
|
||||
#include "prsystem.h"
|
||||
#include "prprf.h"
|
||||
|
||||
#include "nsString.h"
|
||||
#include "nsThreadUtils.h"
|
||||
@ -214,9 +215,9 @@ nsresult LoadInfo::UpdateSystemLoad()
|
||||
uint64_t nice;
|
||||
uint64_t system;
|
||||
uint64_t idle;
|
||||
if (sscanf(buffer.get(), "cpu %Lu %Lu %Lu %Lu",
|
||||
&user, &nice,
|
||||
&system, &idle) != 4) {
|
||||
if (PR_sscanf(buffer.get(), "cpu %llu %llu %llu %llu",
|
||||
&user, &nice,
|
||||
&system, &idle) != 4) {
|
||||
LOG(("Error parsing /proc/stat"));
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user