Fixed NULL string crash.

merge-requests/1/head
Henning Geinitz 2004-10-16 13:49:16 +00:00
rodzic e7ac842c81
commit ee71d11e42
2 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -1,3 +1,7 @@
2004-10-16 Henning Meier-Geinitz <henning@meier-geinitz.de>
* frontend/saned.c: Fixed NULL string crash.
2004-10-17 Ullrich Sigwanz <usigwanz@freesurf.ch> 2004-10-17 Ullrich Sigwanz <usigwanz@freesurf.ch>
* backend/niash_core.c: rewrote buffer portioning * backend/niash_core.c: rewrote buffer portioning

Wyświetl plik

@ -1715,6 +1715,14 @@ process_request (Wire * w)
return; return;
} }
if (!name)
{
DBG (DBG_ERR, "process_request: (open) device_name == NULL\n");
reply.status = SANE_STATUS_INVAL;
sanei_w_reply (w, (WireCodecFunc) sanei_w_open_reply, &reply);
return;
}
can_authorize = 1; can_authorize = 1;
resource = strdup (name); resource = strdup (name);