File 0063-control-enable-octal-and-hexadecimal-parse.patch of Package alsa
From f47480af37eebe4b89020449077d731ad25abc76 Mon Sep 17 00:00:00 2001
From: "Lu, Han" <han.lu@intel.com>
Date: Wed, 14 Jan 2015 09:08:30 +0800
Subject: [PATCH] control: enable octal and hexadecimal parse
Use zero-base for strtol(), so get_integer() and get_integer64()
can parse decimal, octal and hexadecimal data from input string.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/control/ctlparse.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/control/ctlparse.c b/src/control/ctlparse.c
index 978977dbc3db..8d6c3859bec4 100644
--- a/src/control/ctlparse.c
+++ b/src/control/ctlparse.c
@@ -59,7 +59,7 @@ static long get_integer(const char **ptr, long min, long max)
goto out;
s = p;
- val = strtol(s, &p, 10);
+ val = strtol(s, &p, 0);
if (*p == '.') {
p++;
strtol(p, &p, 10);
@@ -87,7 +87,7 @@ static long long get_integer64(const char **ptr, long long min, long long max)
goto out;
s = p;
- val = strtol(s, &p, 10);
+ val = strtol(s, &p, 0);
if (*p == '.') {
p++;
strtol(p, &p, 10);
--
2.2.2