Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-704

4K readfile error?

    XMLWordPrintable

    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 =>

      {"test"}

      ;} 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

              Activity

                People

                Assignee:
                a10003 Eystein Maloy Stenberg
                Reporter:
                comtek comtek comtek (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: