Private
Public Access
2
0

initio.c: Fix for null pointer passed as parameter

Signed-off-by: Cosmin Popescu <gabrielcosmin.popescu@gmail.com>
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Cosmin Popescu
2019-01-18 14:07:26 +02:00
committed by Mihai Tudor Panu
parent c821c19899
commit 41fc378099

View File

@@ -177,6 +177,10 @@ parse_uart(char** proto, size_t n, const char* proto_full)
return NULL;
}
if (end == NULL) {
return NULL;
}
int parity = -1;
if (strncmp(end, U_PARITY_NONE, strlen(U_PARITY_NONE)) == 0) {
parity = MRAA_UART_PARITY_NONE;