Python API: Re-adding rudimentary variable length array pack support.
[vpp.git] / vppapigen / node.c
index ab8adc5..420a128 100644 (file)
@@ -1034,7 +1034,7 @@ char *fixup_input_filename(void)
     if (*cp == '/')
         cp++;
 
-    strcpy (tmpbuf, cp);
+    strncpy (tmpbuf, cp, sizeof(tmpbuf)-1);
 
     cp = tmpbuf;
 
@@ -1339,6 +1339,11 @@ void generate_python (YYSTYPE a1, FILE *fp)
     np = np->peer;
   }
   fprintf (fp, "\n]\n");
+
+  /*
+   * API CRC signature
+   */
+  fprintf (fp, "vl_api_version = 0x%08x\n\n", (unsigned int)input_crc);
 }
 
 void generate(YYSTYPE a1)