mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: Musl bug, or, am I losing my mind?
Date: Thu, 31 Dec 2015 12:53:54 +0100	[thread overview]
Message-ID: <20151231115354.GD23362@port70.net> (raw)
In-Reply-To: <20151231114258.GC23362@port70.net>

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

> * Guided Muscle <atguarded-gizmo@yahoo.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.


  reply	other threads:[~2015-12-31 11:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1295998941.4272196.1451543795605.JavaMail.yahoo.ref@mail.yahoo.com>
2015-12-31  6:36 ` Guided Muscle
2015-12-31 11:42   ` Szabolcs Nagy
2015-12-31 11:53     ` Szabolcs Nagy [this message]
     [not found] <2021478498.4444333.1451595055186.JavaMail.yahoo.ref@mail.yahoo.com>
2015-12-31 20:50 ` Guided Muscle
     [not found] <1229082331.4470232.1451594892445.JavaMail.yahoo.ref@mail.yahoo.com>
2015-12-31 20:48 ` Guided Muscle
     [not found] <786818513.4541881.1451591973977.JavaMail.yahoo.ref@mail.yahoo.com>
2015-12-31 19:59 ` Guided Muscle
     [not found] <2036560950.4461281.1451590538227.JavaMail.yahoo.ref@mail.yahoo.com>
2015-12-31 19:35 ` Guided Muscle
2015-12-31 19:45   ` Rich Felker
     [not found] <1163254146.4344492.1451589596849.JavaMail.yahoo.ref@mail.yahoo.com>
2015-12-31 19:19 ` Guided Muscle
     [not found] <1315337459.141890.1451583062461.JavaMail.yahoo.ref@mail.yahoo.com>
2015-12-31 17:31 ` Guided Muscle
2015-12-31 18:33   ` Rich Felker
2015-12-31 20:34   ` Szabolcs Nagy
2015-12-31 20:35     ` Rich Felker
     [not found] <1535596338.4389758.1451579882141.JavaMail.yahoo.ref@mail.yahoo.com>
2015-12-31 16:38 ` Guided Muscle
     [not found] <1337210970.4152546.1451505881575.JavaMail.yahoo.ref@mail.yahoo.com>
2015-12-30 20:04 ` Guided Muscle
2015-12-30 21:28   ` Szabolcs Nagy
2015-12-31  3:10     ` Szabolcs Nagy
2015-12-31  4:07       ` Rich Felker
2015-12-31 12:10   ` Szabolcs Nagy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151231115354.GD23362@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).