From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: [9fans] fossil memory corruption
Date: Wed, 2 Apr 2014 23:33:32 -0400 [thread overview]
Message-ID: <3024037a9372122c2eb983f628da8176@brasstown.quanstro.net> (raw)
small but potentially deadly ....
diff -c /n/dump/2014/0402/sys/src/cmd/fossil/9fsys.c 9fsys.c
/n/dump/2014/0402/sys/src/cmd/fossil/9fsys.c:34,40 - 9fsys.c:34,40
char* curfsys;
} sbox;
- static char *_argv0;
+ char *_argv0;
#define argv0 _argv0
static char FsysAll[] = "all";
diff -c /n/dump/2014/0402/sys/src/cmd/fossil/Ccli.c Ccli.c
/n/dump/2014/0402/sys/src/cmd/fossil/Ccli.c:33,38 - Ccli.c:33,40
return 0;
}
+ extern char *_argv0;
+
int
cliExec(char* buf)
{
/n/dump/2014/0402/sys/src/cmd/fossil/Ccli.c:57,62 - Ccli.c:59,65
vtUnlock(cbox.lock);
if(!(r = cbox.cmd[i].cmd(argc, argv)))
consPrint("%s\n", vtGetError());
+ _argv0 = nil; /* evade defn of ARGBEGIN */
vtMemFree(p);
return r;
}
next reply other threads:[~2014-04-03 3:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 3:33 erik quanstrom [this message]
2014-04-03 3:39 ` erik quanstrom
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=3024037a9372122c2eb983f628da8176@brasstown.quanstro.net \
--to=quanstro@quanstro.net \
--cc=9fans@9fans.net \
/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.
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).