From a0ae80788cc12284cd63ac678318f95e1238b257 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 1 Jul 2011 11:26:30 -0400 Subject: Replace 4 more sscanf()s with tor_sscanf() For some inexplicable reason, Coverity departs from its usual standards of avoiding false positives here, and warns about all sscanf usage, even when the formatting strings are totally safe. Addresses CID # 447, 446. --- src/or/geoip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/or') diff --git a/src/or/geoip.c b/src/or/geoip.c index 59490bdaf..62c7a5c39 100644 --- a/src/or/geoip.c +++ b/src/or/geoip.c @@ -116,10 +116,10 @@ geoip_parse_entry(const char *line) ++line; if (*line == '#') return 0; - if (sscanf(line,"%u,%u,%2s", &low, &high, b) == 3) { + if (tor_sscanf(line,"%u,%u,%2s", &low, &high, b) == 3) { geoip_add_entry(low, high, b); return 0; - } else if (sscanf(line,"\"%u\",\"%u\",\"%2s\",", &low, &high, b) == 3) { + } else if (tor_sscanf(line,"\"%u\",\"%u\",\"%2s\",", &low, &high, b) == 3) { geoip_add_entry(low, high, b); return 0; } else { -- cgit v1.2.3