From 1868a10f8b06631362618bfc85ca8646da4b4b71 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Tue, 29 Aug 2017 12:27:59 -0400 Subject: Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow. --- libtests/dct_compress.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libtests/dct_compress.cc') diff --git a/libtests/dct_compress.cc b/libtests/dct_compress.cc index e2ed7adf..65539582 100644 --- a/libtests/dct_compress.cc +++ b/libtests/dct_compress.cc @@ -42,8 +42,8 @@ int main(int argc, char* argv[]) char* infilename = argv[1]; char* outfilename = argv[2]; - unsigned int width = atoi(argv[3]); - unsigned int height = atoi(argv[4]); + int width = QUtil::string_to_int(argv[3]); + int height = QUtil::string_to_int(argv[4]); char* colorspace = argv[5]; J_COLOR_SPACE cs = ((strcmp(colorspace, "rgb") == 0) ? JCS_RGB : -- cgit v1.2.3-70-g09d2