author | erik <erik> | 2007-01-22 23:01:41 (UTC) |
---|---|---|
committer | erik <erik> | 2007-01-22 23:01:41 (UTC) |
commit | adcf6075db477909dd8170a74862a6ef91a5127f (patch) (unidiff) | |
tree | da0a1e35c5d392271bce29e84d3af5c30a864f56 /noncore/todayplugins/stockticker | |
parent | 9b4871054d01a47b4c546952a0948553413840d6 (diff) | |
download | opie-adcf6075db477909dd8170a74862a6ef91a5127f.zip opie-adcf6075db477909dd8170a74862a6ef91a5127f.tar.gz opie-adcf6075db477909dd8170a74862a6ef91a5127f.tar.bz2 |
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.
Diffstat (limited to 'noncore/todayplugins/stockticker') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/todayplugins/stockticker/libstocks/csv.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) | |||
314 | end_line = csv_file; | 314 | end_line = csv_file; |
315 | 315 | ||
316 | /* do not use the first line */ | 316 | /* do not use the first line */ |
317 | end_line = strstr(line, "\n"); | 317 | if (!(end_line = strstr(line, "\n"))) |
318 | return 0; | ||
318 | *end_line = 0; | 319 | *end_line = 0; |
319 | end_line++; | 320 | end_line++; |
320 | line = end_line; | 321 | line = end_line; |