aboutsummaryrefslogtreecommitdiffstats
path: root/libtests/dct_compress.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2017-08-29 18:27:59 +0200
committerJay Berkenbilt <ejb@ql.org>2017-08-29 18:28:32 +0200
commit1868a10f8b06631362618bfc85ca8646da4b4b71 (patch)
treec3029002f777a9904bfa3dff559daea989c79025 /libtests/dct_compress.cc
parent742190bd98c0981a07cb39a8eae1e99d909ad5ae (diff)
downloadqpdf-1868a10f8b06631362618bfc85ca8646da4b4b71.tar.zst
Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow.
Diffstat (limited to 'libtests/dct_compress.cc')
-rw-r--r--libtests/dct_compress.cc4
1 files changed, 2 insertions, 2 deletions
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 :