pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Make the wrapper exit with error code 2 ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4001b72f3d54
branches:  trunk
changeset: 465883:4001b72f3d54
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Jan 07 17:40:36 2004 +0000

description:
Make the wrapper exit with error code 2 to signify a buffer overflow to
avoid infinite loops.

diffstat:

 mk/buildlink3/buffer |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r b26d758cd122 -r 4001b72f3d54 mk/buildlink3/buffer
--- a/mk/buildlink3/buffer      Wed Jan 07 17:36:20 2004 +0000
+++ b/mk/buildlink3/buffer      Wed Jan 07 17:40:36 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: buffer,v 1.2 2004/01/07 17:31:02 jlam Exp $
+# $NetBSD: buffer,v 1.3 2004/01/07 17:40:36 jlam Exp $
 #
 # Fill the buffer if it's empty, and shift the arguments.  The next
 # argument checked by the cache and logic files is taken from the
@@ -47,6 +47,7 @@
                                elif $test -z "$buf3"; then buf3="$R$1"
                                elif $test -z "$buf4"; then buf4="$R$1"
                                elif $test -z "$buf5"; then buf5="$R$1"
+                               else exit 2
                                fi
                                ;;
                        esac
@@ -63,6 +64,7 @@
                elif $test -z "$buf3"; then buf3="$arg"
                elif $test -z "$buf4"; then buf4="$arg"
                elif $test -z "$buf5"; then buf5="$arg"
+               else exit 2
                fi
                ;;
        esac



Home | Main Index | Thread Index | Old Index