Revert "seL4platsupport: Use strtol instead of sscanf to parse hex" This reverts commit f61c0d582b3d2406317ff0276e8e7901105502b8. The string being parsed is created using the %p format type to sprintf, as such it should be parsed back with precisely the same format arguments.
diff --git a/libsel4platsupport/src/bootinfo.c b/libsel4platsupport/src/bootinfo.c index a011f33..2906035 100644 --- a/libsel4platsupport/src/bootinfo.c +++ b/libsel4platsupport/src/bootinfo.c
@@ -23,8 +23,8 @@ ZF_LOGE("Attempted %s in an environment without bootinfo.", __FUNCTION__); return NULL; } - void *bi = (void *)strtol(bi_string, NULL, 0); - if (bi == 0) { + void *bi; + if (sscanf(bi_string, "%p", &bi) != 1) { ZF_LOGE("bootinfo environment value '%s' was not valid.", bi_string); return NULL; }