error-helpers: avoid crash when error is not recognized
Just remove the last element with NULL strings in the array of errors, as we're safe using G_N_ELEMENTS() to iterate it. Reported by Jose Maria Gonzalez Calabozo <jmgonzalezc@indra.es>
This commit is contained in:
@@ -198,8 +198,7 @@ static ErrorTable msg_errors[] = {
|
||||
{ MM_MESSAGE_ERROR_NO_NETWORK, "nonetwork", "No network" },
|
||||
{ MM_MESSAGE_ERROR_NETWORK_TIMEOUT, "networktimeout", "Network timeout" },
|
||||
{ MM_MESSAGE_ERROR_NO_CNMA_ACK_EXPECTED, "nocnmaackexpected", "No CNMA acknowledgement expected" },
|
||||
{ MM_MESSAGE_ERROR_UNKNOWN, "unknown", "Unknown" },
|
||||
{ -1, NULL, NULL }
|
||||
{ MM_MESSAGE_ERROR_UNKNOWN, "unknown", "Unknown" }
|
||||
};
|
||||
|
||||
GError *
|
||||
|
Reference in New Issue
Block a user