Fix SVACE issue. 84/313984/1
authorAdam Michalski <a.michalski2@partner.samsung.com>
Wed, 3 Jul 2024 14:53:09 +0000 (16:53 +0200)
committerAdam Michalski <a.michalski2@partner.samsung.com>
Wed, 3 Jul 2024 14:53:09 +0000 (16:53 +0200)
Reference WGID #220706.

Change-Id: I9c2f5f7a1811a6c4690d0eef4a111f4dc2cdc9b9

src/upgrade-apply/main.c

index c15c030b84d9529b4db060ca43e96930eff13894..5af3f4a69f0eb9207ae9e6844c5bf348b8660e21 100644 (file)
@@ -446,7 +446,7 @@ int get_block_count_from_progress_file(const char* progress_info_file, const cha
                                        fprintf(stderr, "%s file is not compatible - value missing\n", progress_info_file);
                                        ret = -1;
                                } else {
-                                       *block_count = (uint64_t) atoi(read_word);
+                                       *block_count = strtoull(read_word, NULL, 10);
                                        fprintf(stderr, "Block count for %s: %"PRIu64"\n", archive_file, *block_count);
                                        ret = 0;
                                }