summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Keller <skeller@gnome.org>2021-02-25 02:28:52 +0100
committerSebastian Keller <skeller@gnome.org>2021-02-25 02:34:43 +0100
commitdb0e20607050c7c859446420905cc8680249554a (patch)
treee03bda7e79c0d38900e6d910783469efd92902e6
parent79af1f931c44affaf4aa8f2dc8cdfdf4426f554f (diff)
downloadgnome-desktop-db0e20607050c7c859446420905cc8680249554a.tar.gz
bg-slide-show: Always parse date/time integers in base 10
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. Fixes https://gitlab.gnome.org/GNOME/gnome-desktop/-/issues/189
-rw-r--r--libgnome-desktop/gnome-bg-slide-show.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgnome-desktop/gnome-bg-slide-show.c b/libgnome-desktop/gnome-bg-slide-show.c
index 760ed566..e5a60fa5 100644
--- a/libgnome-desktop/gnome-bg-slide-show.c
+++ b/libgnome-desktop/gnome-bg-slide-show.c
@@ -359,7 +359,7 @@ stack_is (GnomeBGSlideShow *self,
static int
parse_int (const char *text)
{
- return strtol (text, NULL, 0);
+ return strtol (text, NULL, 10);
}
static void