+
+ /* The above are all guaranteed to fit in the fixed-size buffer.
+ However, extra_flag and device have no restrictions,
+ so we must check. */
+
+ if (extra_flag) {
+ if (strlen (buf) + 1 + strlen (extra_flag) >= sizeof buf) {
+ reply_with_error ("internal buffer overflow: sfdisk extra_flag too long");
+ return -1;
+ }