tools/graph2dot: use larger data types than int for array/string sizes
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 12 May 2015 01:59:30 +0000 (03:59 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 21 May 2015 18:43:38 +0000 (20:43 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit acf4925f444636a828534ab47d0f86c21a7a9b4e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tools/graph2dot.c

index 964322d..868c62f 100644 (file)
@@ -153,7 +153,7 @@ int main(int argc, char **argv)
 
     /* read from infile and put it in a buffer */
     {
-        unsigned int count = 0;
+        int64_t count = 0;
         struct line *line, *last_line, *first_line;
         char *p;
         last_line = first_line = av_malloc(sizeof(struct line));
@@ -169,7 +169,7 @@ int main(int argc, char **argv)
         graph_string = av_malloc(count + 1);
         p = graph_string;
         for (line = first_line; line->next; line = line->next) {
-            unsigned int l = strlen(line->data);
+            size_t l = strlen(line->data);
             memcpy(p, line->data, l);
             p += l;
         }