If an array is 5 chars in size: char answer[5];
and we write the 6th char (counting from 0)... answer[5] = '\0'; we get problems: cmds-chunk.c: In function 'ask_user.clone.0': cmds-chunk.c:1343: warning: array subscript is above array bounds Fix it... Signed-off-by: Eric Sandeen <sand...@redhat.com> --- diff --git a/cmds-chunk.c b/cmds-chunk.c index 03314de..7c3257c 100644 --- a/cmds-chunk.c +++ b/cmds-chunk.c @@ -1340,7 +1340,7 @@ again: } i++; } - answer[5] = '\0'; + answer[4] = '\0'; __fpurge(stdin); if (strlen(answer) == 0) { -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html