Skip to content

Commit 42df7c4

Browse files
JPeisachmtwebster
authored andcommitted
Always parse date/time integers in base-10
Ref: GNOME/gnome-desktop@db0e206#diff-2449085de556a57f2376e17c247ae29bf6b3f4c60a15b979b494a82c12e6171d "People might prefix their dates/times with 0 which leads to the number being interpreted as octal value. This can then lead to "08" being interpreted as 0, because 8 is not a valid octal value. This is also much more likely than people intentionally trying to use octal or hex values for dates/times."
1 parent dc2b60e commit 42df7c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcinnamon-desktop/gnome-bg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2999,7 +2999,7 @@ stack_is (SlideShow *parser,
29992999
static int
30003000
parse_int (const char *text)
30013001
{
3002-
return strtol (text, NULL, 0);
3002+
return strtol (text, NULL, 10);
30033003
}
30043004

30053005
static void

0 commit comments

Comments
 (0)