]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
Fix hexadecimal parsing in config file
authorEric Leblond <eric@inl.fr>
Thu, 12 Jun 2008 09:10:58 +0000 (11:10 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 12 Jun 2008 09:10:58 +0000 (11:10 +0200)
The config file parsing was not able to parse integer given in hex notation.
This patch modify the parsing of configfile to be able to use different
integers notation.

Signed-off-by: Eric Leblond <eric@inl.fr>
src/conffile.c

index b74da686176ef47b5460e9667fc1373888016c5e..72afb8e6cf10d1a19314cb9b3231678fe7f1c524 100644 (file)
@@ -192,7 +192,7 @@ int config_parse_file(const char *section, struct config_keyset *kset)
                                        }
                                        break;
                                case CONFIG_TYPE_INT:
-                                       ce->u.value = atoi(args);
+                                       ce->u.value = strtoul(args, NULL, 0);
                                        break;
                                case CONFIG_TYPE_CALLBACK:
                                        (ce->u.parser)(args);