You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2015/12/04 23:40:59 UTC
incubator-mynewt-larva git commit: build number was not parsed from
right token.
Repository: incubator-mynewt-larva
Updated Branches:
refs/heads/master 086d157d0 -> 21a7e74ab
build number was not parsed from right token.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/21a7e74a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/21a7e74a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/21a7e74a
Branch: refs/heads/master
Commit: 21a7e74abdeacbb704f72f043013e4835453cbd3
Parents: 086d157
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Fri Dec 4 14:40:15 2015 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Fri Dec 4 14:40:15 2015 -0800
----------------------------------------------------------------------
project/bin2img/src/bin2img.c | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/21a7e74a/project/bin2img/src/bin2img.c
----------------------------------------------------------------------
diff --git a/project/bin2img/src/bin2img.c b/project/bin2img/src/bin2img.c
index 84cf72d..ff8a139 100644
--- a/project/bin2img/src/bin2img.c
+++ b/project/bin2img/src/bin2img.c
@@ -76,6 +76,10 @@ parse_ver(struct image_version *out_ver, char *s)
}
out_ver->iv_revision = ul;
+ tok = strtok(NULL, ".");
+ if (tok == NULL) {
+ return -1;
+ }
ul = strtoul(tok, &ep, 16);
if (tok[0] == '\0' || ep[0] != '\0' || ul > UINT32_MAX) {
return -1;