Commit 2b4ac889 authored by Lennart Poettering's avatar Lennart Poettering

bus: when the first char a server receives isn't the NUL byte immediately fail

parent 8411d2a2
......@@ -313,13 +313,16 @@ static int bus_socket_auth_verify_server(sd_bus *b) {
assert(b);
if (b->rbuffer_size < 3)
if (b->rbuffer_size < 1)
return 0;
/* First char must be a NUL byte */
if (*(char*) b->rbuffer != 0)
return -EIO;
if (b->rbuffer_size < 3)
return 0;
/* Begin with the first line */
if (b->auth_rbegin <= 0)
b->auth_rbegin = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment