aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2005-10-12 00:16:12 +0000
committerDanny Smith <dannysmith@users.sourceforge.net>2005-10-12 00:16:12 +0000
commit0851f04365fb9d46d1e10808d5f55619ccfc7aed (patch)
tree5bb5e7b5f6f191a66332c56c61ed78295d5c19e1 /binutils
parent9e691ad0b4078ade4054a8a66a9937af81aed210 (diff)
downloadgdb-0851f04365fb9d46d1e10808d5f55619ccfc7aed.zip
gdb-0851f04365fb9d46d1e10808d5f55619ccfc7aed.tar.gz
gdb-0851f04365fb9d46d1e10808d5f55619ccfc7aed.tar.bz2
2005-10-11 Danny Smith <dannysmith@users.sourceforge.net>
* rclex.l (handle quotes): Stop parsing hex notation escaped chars after the first two digits,
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/rclex.l7
2 files changed, 11 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index aeaa659..fdc26bb 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-11 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * rclex.l (handle quotes): Stop parsing hex notation escaped
+ chars after the first two digits,
+
2005-10-11 Nick Clifton <nickc@redhat.com>
PR binutils/1437
diff --git a/binutils/rclex.l b/binutils/rclex.l
index eb33b4a..92b1ec7 100644
--- a/binutils/rclex.l
+++ b/binutils/rclex.l
@@ -308,6 +308,7 @@ handle_quotes (const char *input, unsigned long *len)
char *ret, *s;
const char *t;
int ch;
+ int num_xdigits;
ret = get_string (strlen (input) + 1);
@@ -389,7 +390,11 @@ handle_quotes (const char *input, unsigned long *len)
case 'x':
++t;
ch = 0;
- while (1)
+ /* We only handle single byte chars here. Make sure
+ we finish an escape sequence like "/xB0ABC" after
+ the first two digits. */
+ num_xdigits = 2;
+ while (num_xdigits--)
{
if (*t >= '0' && *t <= '9')
ch = (ch << 4) | (*t - '0');