From adcf6075db477909dd8170a74862a6ef91a5127f Mon Sep 17 00:00:00 2001 From: erik Date: Mon, 22 Jan 2007 23:01:41 +0000 Subject: Each file in this commit had a problem where a function might return a null value for a pointer and that null value was not checked. --- (limited to 'noncore/todayplugins') diff --git a/noncore/todayplugins/stockticker/libstocks/csv.c b/noncore/todayplugins/stockticker/libstocks/csv.c index 6170bed..86d8607 100644 --- a/noncore/todayplugins/stockticker/libstocks/csv.c +++ b/noncore/todayplugins/stockticker/libstocks/csv.c @@ -314,7 +314,8 @@ stock *parse_csv_history_file(char *csv_file) end_line = csv_file; /* do not use the first line */ - end_line = strstr(line, "\n"); + if (!(end_line = strstr(line, "\n"))) + return 0; *end_line = 0; end_line++; line = end_line; -- cgit v0.9.0.2