Details
-
Type:
Bug
-
Status: Done
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 3.6.3
-
Component/s: None
-
Labels:None
Description
If a file is greater than 4094 bytes cfengine reports: ExpandAndMapIteratorsFromScalar called with invalid strlen
Reproducing:
> echo "">/tmp/data; for X in `seq 1 4095` ;do echo -n "x">>/tmp/data ;done
> /tmp/3.5/var/cfengine/bin/cf-promises -f <(echo 'body common control {bundlesequence =>
;} bundle agent test
{ vars: "test" string => readfile("/tmp/data", "81902"); } ')
expand.c:286: ProgrammingError: ExpandAndMapIteratorsFromScalar called with invalid strlen
This is using the binary and libraries from the i386 3.5.0rc-1 debian package.
I suggest that 4K is far too small as a filesize limit. Can't the second argument to filesize() permit larger files?
Attachments
Release management
Issue Links
- relates to
-
CFE-35 Error reading files in /sys directory
-
- Done
-
-
CFE-3763 The with attribute should be able to take data from readfile()
-
- Open
-
-
CFE-1766 String variables: Sane limit for today's machines
-
- Done
-
-
CFE-830 Expand template generates programming error
-
- Done
-
-
CFE-1142 3.6 beta1, readfile(): max_size is more than internal limit
-
- Done
-
-
CFE-3958 Note about 4k limit in readfile() docs is out of date
-
- Done
-
-
CFE-1021 Improve the situation for string type (maximum length, documentation)
-
- Unconfirmed
-