shithub: libvpx

Download patch

ref: 3a57ce4478e85b534ecb369a599e41b7edb4d423
parent: 348cff040ae6893f46395f003fab336c858dec4d
author: Johann <[email protected]>
date: Tue Sep 27 11:37:10 EDT 2016

Cast strto[u]l down

Change-Id: I945b2f8754cf484a08e5ba511cfd2d4a44181b08

--- a/args.c
+++ b/args.c
@@ -122,7 +122,7 @@
   uint32_t rawval;
   char *endptr;
 
-  rawval = strtoul(arg->val, &endptr, 10);
+  rawval = (uint32_t)strtoul(arg->val, &endptr, 10);
 
   if (arg->val[0] != '\0' && endptr[0] == '\0') {
     if (rawval <= UINT_MAX) return rawval;
@@ -139,7 +139,7 @@
   int32_t rawval;
   char *endptr;
 
-  rawval = strtol(arg->val, &endptr, 10);
+  rawval = (int32_t)strtol(arg->val, &endptr, 10);
 
   if (arg->val[0] != '\0' && endptr[0] == '\0') {
     if (rawval >= INT_MIN && rawval <= INT_MAX) return (int)rawval;