aboutsummaryrefslogtreecommitdiff
path: root/gas/app.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-12-01 15:20:19 +0000
committerNick Clifton <nickc@redhat.com>2016-12-01 15:20:19 +0000
commit69ace2200106348a1b00d509a6a234337c104c17 (patch)
treea1f179bb024f0411fe964d6ea156285b49febc25 /gas/app.c
parent4cbd84083ea89e870526ed0c80d462084887ba6e (diff)
downloadgdb-69ace2200106348a1b00d509a6a234337c104c17.zip
gdb-69ace2200106348a1b00d509a6a234337c104c17.tar.gz
gdb-69ace2200106348a1b00d509a6a234337c104c17.tar.bz2
Fix seg fault attempting to unget an EOF character.
PR gas/20898 * app.c (do_scrub_chars): Do not attempt to unget EOF.
Diffstat (limited to 'gas/app.c')
-rw-r--r--gas/app.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/app.c b/gas/app.c
index 6b883a1..dcd8219 100644
--- a/gas/app.c
+++ b/gas/app.c
@@ -1188,7 +1188,7 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
state = -2;
break;
}
- else
+ else if (ch2 != EOF)
{
UNGET (ch2);
}