[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Fix a null-pointer deref when writing geoip stats
commit 4604b3ab197af5f6d0d407bd2dbe4b0d6a14e22b
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Fri Dec 18 10:00:44 2015 -0500
Fix a null-pointer deref when writing geoip stats
Found by coverity; CID 1327892.
---
src/or/geoip.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/or/geoip.c b/src/or/geoip.c
index 3ef1672..26030ae 100644
--- a/src/or/geoip.c
+++ b/src/or/geoip.c
@@ -1279,6 +1279,8 @@ geoip_dirreq_stats_write(time_t now)
/* Generate history string .*/
str = geoip_format_dirreq_stats(now);
+ if (! str)
+ goto done;
/* Write dirreq-stats string to disk. */
if (!check_or_create_data_subdir("stats")) {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits