From bd84cf90dcb295b04c2a2acc85c982993f6260f3 Mon Sep 17 00:00:00 2001 From: sirh3e Date: Wed, 28 Oct 2020 10:43:14 +0100 Subject: [PATCH] Update db.c changed strcmp into strncmp --- db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db.c b/db.c index 4250a91..b4c9704 100644 --- a/db.c +++ b/db.c @@ -633,7 +633,7 @@ PrepareResult prepare_statement(InputBuffer* input_buffer, if (strncmp(input_buffer->buffer, "insert", 6) == 0) { return prepare_insert(input_buffer, statement); } - if (strcmp(input_buffer->buffer, "select") == 0) { + if (strncmp(input_buffer->buffer, "select", 6) == 0) { statement->type = STATEMENT_SELECT; return PREPARE_SUCCESS; }