aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--classes/swupd-image.bbclass4
1 files changed, 3 insertions, 1 deletions
diff --git a/classes/swupd-image.bbclass b/classes/swupd-image.bbclass
index ba6b98e..0cac12d 100644
--- a/classes/swupd-image.bbclass
+++ b/classes/swupd-image.bbclass
@@ -84,9 +84,11 @@ REQUIRED_DISTRO_FEATURES = "systemd"
python () {
ver = d.getVar('OS_VERSION', True) or 'invalid'
try:
- int(ver)
+ ver = int(ver)
except ValueError:
bb.fatal("Invalid value for OS_VERSION (%s), must be a non-negative integer value." % ver)
+ if ver <= 0 or ver > 2147483647:
+ bb.fatal('OS_VERSION outside of valid range (> 0, <= 2147483647): %d' % ver)
havebundles = (d.getVar('SWUPD_BUNDLES', True) or '') != ''
deploy_dir = d.getVar('DEPLOY_DIR_SWUPD', True)