From c3fb9dbfa35043d4cb4c737032371df926ae6d3e Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 18 Jun 2012 09:05:01 +0000 Subject: Dima Kogan: 30515: fix globbing problem with large files: failure owing to bad cast with large integers --- ChangeLog | 7 ++++++- Src/glob.c | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4e673df94..12baf69b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-06-18 Peter Stephenson + + * Dima Kogan: 30515: Src/glob.c: glob size test failed on very + large files owing to integer type error. + 2012-06-15 Phil Pennock * 30513: zsh/regex metafy fixes for widechar; similar to 29838. @@ -16369,5 +16374,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5670 $ +* $Revision: 1.5671 $ ***************************************************** diff --git a/Src/glob.c b/Src/glob.c index d3ce73310..ca2ffaf51 100644 --- a/Src/glob.c +++ b/Src/glob.c @@ -997,7 +997,9 @@ gmatchcmp(Gmatch a, Gmatch b) break; } if (r) - return (int) ((s->tp & GS_DESC) ? -r : r); + return (s->tp & GS_DESC) ? + (r < 0L ? 1 : -1) : + (r > 0L ? 1 : -1); } return 0; } -- cgit 1.4.1