Enforce length limits on PKG and NAME fields in pkginfo

This commit is contained in:
Tom G. Christensen
2008-03-25 14:41:08 +00:00
parent 951d5ac6de
commit ac054594dc
2 changed files with 8 additions and 0 deletions

View File

@@ -113,6 +113,10 @@ pack_info()
local pstamp="$os-$($UNAME -n)`date '+%Y%m%d%H%M'`"
# Check length of pkgname and name to make sure we're within limits
[ ${#pkgname} -gt 9 ] && error $E_SVR4_PKG_OVERFLOW pack_info
[ ${#name} -gt 256 ] && error $E_SVR4_NAME_OVERFLOW pack_info
$SED -e "s#%%pkgname%%#$pkgname#g" \
-e "s#%%version%%#$version#g" \
-e "s#%%pkgcat%%#$pkgcat#g" \