aboutsummaryrefslogtreecommitdiff
path: root/binutils/nlmheader.y
diff options
context:
space:
mode:
authorJ.T. Conklin <jtc@acorntoolworks.com>1994-07-11 23:06:35 +0000
committerJ.T. Conklin <jtc@acorntoolworks.com>1994-07-11 23:06:35 +0000
commitee5f24609277ca1fe38a74a9db4e17dbe8da63ab (patch)
tree32e5a5ed20fa9bcb1f9cfbf6e384c60aa7e2d6e0 /binutils/nlmheader.y
parent4a967132542fb419e20a75c072a33465e3bfb177 (diff)
downloadgdb-ee5f24609277ca1fe38a74a9db4e17dbe8da63ab.zip
gdb-ee5f24609277ca1fe38a74a9db4e17dbe8da63ab.tar.gz
gdb-ee5f24609277ca1fe38a74a9db4e17dbe8da63ab.tar.bz2
* nlmheader.y: Null terminate var_hdr->threadName.
Diffstat (limited to 'binutils/nlmheader.y')
-rw-r--r--binutils/nlmheader.y19
1 files changed, 17 insertions, 2 deletions
diff --git a/binutils/nlmheader.y b/binutils/nlmheader.y
index caa8f43..248bec3 100644
--- a/binutils/nlmheader.y
+++ b/binutils/nlmheader.y
@@ -29,7 +29,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <ansidecl.h>
#include <stdio.h>
#include <ctype.h>
-#include <bfd.h>
+#include "bfd.h"
#include "sysdep.h"
#include "bucomm.h"
#include "nlm/common.h"
@@ -196,6 +196,12 @@ command:
free ($2);
free ($3);
free ($4);
+ if (version_hdr->month < 1 || version_hdr->month > 12)
+ nlmheader_warn ("illegal month", -1);
+ if (version_hdr->day < 1 || version_hdr->day > 31)
+ nlmheader_warn ("illegal day", -1);
+ if (version_hdr->year < 1900 || version_hdr->year > 3000)
+ nlmheader_warn ("illegal year", -1);
}
| DEBUG
{
@@ -239,6 +245,11 @@ command:
fixed_hdr->flags &=~ nlmlex_get_number ($2);
free ($2);
}
+ | FULLMAP
+ {
+ map_file = "";
+ full_map = true;
+ }
| FULLMAP STRING
{
map_file = $2;
@@ -260,6 +271,10 @@ command:
{
input_files = string_list_append (input_files, $2);
}
+ | MAP
+ {
+ map_file = "";
+ }
| MAP STRING
{
map_file = $2;
@@ -346,7 +361,7 @@ command:
}
var_hdr->threadNameLength = len;
strncpy (var_hdr->threadName, $2, len);
- var_hdr->screenName[NLM_MAX_THREAD_NAME_LENGTH] = '\0';
+ var_hdr->threadName[len] = '\0';
free ($2);
}
| TYPE STRING