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

ProgrammingError: ExpandAndMapIteratorsFromScalar called with invalid strlen

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      When expanding templates with code like the following:

      <pre>
      files:
      "$(path)"
      edit_defaults => empty,
      edit_template => "$(path).tmpl",
      </pre>

      I get this error:

      expand.c:287: ProgrammingError: ExpandAndMapIteratorsFromScalar called with invalid strlen

      Looking at the current sources, it seems the error stems from
      ''ExpandAndMapIteratorsFromScalar()'' being called with a string of
      length larger than 4096 (''CF_BUFSIZE'').

      So, this will happen if you use large-ish ''[%CFEngine BEGIN/END %]''
      blocks in your templates.

      Version 3.4.2 did not have this limitation, can you please lift it
      again?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                riccardomurri Riccardo Murri
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: