diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2011-09-29 20:00:58 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-10-03 10:48:37 -0400 |
commit | 95d3cb8d4ff2e3e8fdc186f2ebf617fd29ddfdec (patch) | |
tree | 5cf4c7c585dda5455555334d3c32ff56ddce86d2 /src/db | |
parent | c98298029c51fdbc727536fec7a27795184d04e4 (diff) | |
download | sssd-95d3cb8d4ff2e3e8fdc186f2ebf617fd29ddfdec.tar.gz sssd-95d3cb8d4ff2e3e8fdc186f2ebf617fd29ddfdec.tar.bz2 sssd-95d3cb8d4ff2e3e8fdc186f2ebf617fd29ddfdec.zip |
Use explicit base 10 for converting strings to integers
https://fedorahosted.org/sssd/ticket/1013
Diffstat (limited to 'src/db')
-rw-r--r-- | src/db/sysdb.c | 2 | ||||
-rw-r--r-- | src/db/sysdb_ops.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c index eafa7fdc..1a326030 100644 --- a/src/db/sysdb.c +++ b/src/db/sysdb.c @@ -378,7 +378,7 @@ int sysdb_attrs_get_uint32_t(struct sysdb_attrs *attrs, const char *name, } errno = 0; - val = strtouint32((const char *) el->values[0].data, &endptr, 0); + val = strtouint32((const char *) el->values[0].data, &endptr, 10); if (errno != 0) return errno; if (*endptr) return EINVAL; diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c index 522bbb08..f4418e4e 100644 --- a/src/db/sysdb_ops.c +++ b/src/db/sysdb_ops.c @@ -60,7 +60,7 @@ static uint32_t get_attr_as_uint32(struct ldb_message *msg, const char *attr) } errno = 0; - l = strtoll((const char *)v->data, NULL, 0); + l = strtoll((const char *)v->data, NULL, 10); if (errno) { return (uint32_t)-1; } |