From 6a59a5c20bc0b86510df47b1b17ee34e902a2e5b Mon Sep 17 00:00:00 2001 From: Diego Novillo Date: Mon, 3 Oct 2011 17:01:43 +0000 Subject: [PATCH] * options.cc (parse_uint): Fix dereference of RETVAL. --- gold/ChangeLog | 4 ++++ gold/options.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index e12a151b09b..9f1083c79a8 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,7 @@ +2011-10-03 Diego Novillo + + * options.cc (parse_uint): Fix dereference of RETVAL. + 2011-09-29 Sriraman Tallam * layout.h (section_order_map_): New member. diff --git a/gold/options.cc b/gold/options.cc index d91a8343f9f..dcf6ba71ace 100644 --- a/gold/options.cc +++ b/gold/options.cc @@ -198,7 +198,7 @@ parse_uint(const char* option_name, const char* arg, int* retval) { char* endptr; *retval = strtol(arg, &endptr, 0); - if (*endptr != '\0' || retval < 0) + if (*endptr != '\0' || *retval < 0) gold_fatal(_("%s: invalid option value (expected an integer): %s"), option_name, arg); } -- 2.30.2