< prev index next >

src/share/tools/hsdis/hsdis.c

Print this page
rev 8113 : 8076475: Misuses of strncpy/strncat
Summary: Various small fixes around strncpy and strncat
Reviewed-by: dsamersoff

@@ -408,10 +408,11 @@
       strncpy(iop, p, plen);
       iop += plen;
     }
     p = q;
   }
+  *iop = '\0';
 }
 
 static void print_help(struct hsdis_app_data* app_data,
                        const char* msg, const char* arg) {
   DECL_PRINTF_CALLBACK(app_data);
< prev index next >