aboutsummaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorDmitry Potapov <dpotapov@gmail.com>2008-10-05 04:40:36 +0400
committerShawn O. Pearce <spearce@spearce.org>2008-10-06 00:37:30 -0700
commit62525ef78e8aec776f44da525030d76b52f14a57 (patch)
tree47adb8741e7f6c41d41644119662ed36f6b4936e /builtin-apply.c
parent71b989e7dd1dcf891369319cfeda0ed8b6a152e1 (diff)
downloadgit-62525ef78e8aec776f44da525030d76b52f14a57.tar.gz
git-62525ef78e8aec776f44da525030d76b52f14a57.tar.xz
make prefix_path() never return NULL
There are 9 places where prefix_path is called, and only in one of them the returned pointer was checked to be non-zero and only to call exit(128) as it is usually done by die(). In other 8 places, the returned value was not checked and it caused SIGSEGV when a path outside of the working tree was used. For instance, running git update-index --add /some/path/outside caused SIGSEGV. This patch changes prefix_path() to die if the path is outside of the repository, so it never returns NULL. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'builtin-apply.c')
0 files changed, 0 insertions, 0 deletions