From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9025 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Musl bug, or, am I losing my mind? Date: Thu, 31 Dec 2015 12:53:54 +0100 Message-ID: <20151231115354.GD23362@port70.net> References: <1295998941.4272196.1451543795605.JavaMail.yahoo.ref@mail.yahoo.com> <1295998941.4272196.1451543795605.JavaMail.yahoo@mail.yahoo.com> <20151231114258.GC23362@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1451562849 8628 80.91.229.3 (31 Dec 2015 11:54:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Dec 2015 11:54:09 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9038-gllmg-musl=m.gmane.org@lists.openwall.com Thu Dec 31 12:54:09 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aEbo0-0003gK-Jo for gllmg-musl@m.gmane.org; Thu, 31 Dec 2015 12:54:08 +0100 Original-Received: (qmail 30605 invoked by uid 550); 31 Dec 2015 11:54:06 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 30587 invoked from network); 31 Dec 2015 11:54:06 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20151231114258.GC23362@port70.net> User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:9025 Archived-At: * Szabolcs Nagy [2015-12-31 12:42:58 +0100]: > * Guided Muscle [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.