- x_obstack_blank (&extended_header, p);
- x_obstack_1grow (&extended_header, '\n');
- cp = obstack_next_free (extended_header.stk) - string_length - p - 1;
- memmove (cp + p, cp, string_length);
+ size = p;
+ if (size != p)
+ {
+ ERROR ((0, 0,
+ _("Generated keyword/value pair is too long (keyword=%s, length=%s)"),
+ keyword, nbuf));
+ obstack_free (xhdr->stk, obstack_finish (xhdr->stk));
+ return false;
+ }
+ x_obstack_blank (xhdr, p);
+ x_obstack_1grow (xhdr, '\n');
+ cp = obstack_next_free (xhdr->stk) - xhdr->string_length - p - 1;
+ memmove (cp + p, cp, xhdr->string_length);