Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 31 Dec 2015 12:53:54 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: Musl bug, or, am I losing my mind?

* Szabolcs Nagy <nsz@...t70.net> [2015-12-31 12:42:58 +0100]:

> * Guided Muscle <atguarded-gizmo@...oo.com> [2015-12-31 06:36:35 +0000]:
> > readv(0, [{"", 0}, {"+7,20957:key5238->value523852385"..., 1024}], 2) = 1024
> > readv(0, [{"23852385238523852385238523852385"..., 19950}, {"23852385238523852385238523852385"..., 1024}], 2) = 19952
> > writev(2, [{"cdb: (stdin): bad format\n", 25}, {NULL, 0}], 2) = 25
> 
> 
> cdb reads 1024+19952 = 20976 bytes
> which is a 18 byte header + 20957 byte value = 20975 bytes
> 
> so it did not read enough to determine that the format is wrong
> but it stopped parsing
> 

err, it did read enough, but most likely
the last byte should be a \n and it got
lost (probably because of null termination)

anyway, you have to look at the code to
figure out how the last byte might be
handled incorrectly.

> so it does not do the input buffering correctly
> 
> you need to check the code how it parses the input,
> if it uses libc functions (e.g. getline) then it might
> be a musl bug otherwise it's just a cdb bug.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.