MirBSD Korn Shell for Jehanne
Go to file
tg 667d792d6a • Address concerns of Chris Palmer from the Android security team
– possible integer overflows in memory allocation, mostly
    ‣ multiplication: all are checked now
    ‣ addition: reviewed them, most were “proven” or guessed to be
      “almost” impossible to run over (e.g. when we have a string
      whose length is taken it is assumed that the length will be
      more than only a few bytes below SIZE_MAX, since code and
      stack have to fit); some are checked now (e.g. when one of
      the summands is an off_t); most of the unchecked ones are
      annotated now
    ⇒ cost (MirBSD/i386 static): +76 .text
    ⇒ cost (Debian sid/i386): +779 .text  -4 .data
  – on Linux targets, setuid() setresuid() setresgid() can fail
    with EAGAIN; check for that and, if so, warn once and retry
    infinitely (other targets to be added later once we know that
    they are “insane”)
    ⇒ cost (Debian sid/i386): +192 .text (includes .rodata)
• setmode.c: Do overflow checking for realloc() too; switch back
  from calloc() to a checked malloc() for simplification while there
• define -DIN_MKSH and let setmode.c look a tad nicer while here
2010-09-14 21:26:19 +00:00
Build.sh • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
check.pl more KNF, mostly whitespace, this time more manual labour applying style(9) 2009-06-10 18:12:51 +00:00
check.t • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
dot.mkshrc use string width, not length, if we have it 2010-07-11 13:54:37 +00:00
edit.c • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
emacsfn.h • merge printf from OpenBSD 2010-07-17 22:09:40 +00:00
eval.c • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
exec.c • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
expr.c improve string pooling: saves 316 bytes in .text 2010-08-28 18:50:58 +00:00
funcs.c • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
histrap.c • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
jobs.c shave off another 468 bytes: we’re 300 bytes smaller than BEFORE the 2010-08-28 20:22:24 +00:00
lalloc.c • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
lex.c • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
main.c • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
Makefile • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
misc.c • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
mksh.1 lintian caught hyphen-used-as-minus-sign 2010-09-05 20:43:37 +00:00
setmode.c • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
sh_flags.h compatibility: stick “set ±o arc4random” around for a bit longer, 2010-07-13 13:07:58 +00:00
sh.h • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
shf.c • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
strlcpy.c more KNF, mostly whitespace, this time more manual labour applying style(9) 2009-06-10 18:12:51 +00:00
syn.c • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
tree.c • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00
var_spec.h further optimise and simplify the handling of $RANDOM, reads and writes 2009-09-26 03:40:03 +00:00
var.c • Address concerns of Chris Palmer from the Android security team 2010-09-14 21:26:19 +00:00