- int index, count;
- if (sscanf(CS big_buffer + 6, "%d %d", &index, &count) != 2)
- goto SPOOL_FORMAT_ERROR;
- if (index < ACL_MVARS)
- {
- index += ACL_CVARS;
- acl_var[index] = store_get(count + 1);
- if (fread(acl_var[index], 1, count+1, f) < count) goto SPOOL_READ_ERROR;
- acl_var[index][count] = 0;
- }
+ uschar *name, *endptr;
+ int count;
+ tree_node *node;
+
+ endptr = Ustrchr(big_buffer + 6, ' ');
+ if (endptr == NULL) goto SPOOL_FORMAT_ERROR;
+ name = string_sprintf("%c%.*s", big_buffer[4], endptr - big_buffer - 6,
+ big_buffer + 6);
+ if (sscanf(CS endptr, " %d", &count) != 1) goto SPOOL_FORMAT_ERROR;
+
+ node = acl_var_create(name);
+ node->data.ptr = store_get(count + 1);
+ if (fread(node->data.ptr, 1, count+1, f) < count) goto SPOOL_READ_ERROR;
+ ((uschar*)node->data.ptr)[count] = 0;