Don't null terminate the first byte of the appended command line...

This commit is contained in:
Eric W. Biederman 2002-01-24 23:18:02 +00:00
commit bb176a0b85
2 changed files with 7 additions and 2 deletions

View file

@ -6,8 +6,8 @@
# the result will be a directory tree that you can run mkelfImage in
PREFIX=/usr/local/
PERLPATH=/usr/bin/perl
VERSION="1.10"
DATE="21 January 2002"
VERSION="1.11"
DATE="24 January 2002"
SHAREDIR=$(PREFIX)/share/mkelfImage
BINDIR=$(PREFIX)/bin
@ -24,6 +24,10 @@ all: $(FILES)
clean:
rm -f $(FILES)
distclean: clean
find . -type f -name '*~' | xargs rm -f
install: $(DIRS) $(FILES)
mkdir -p $(SHAREDIR) $(BINDIR) $(MANDIR)
cp -fr elf32-i386/ $(SHAREDIR)

View file

@ -382,6 +382,7 @@ void append_command_line(struct parameters *real_mode, char *arg, int arg_bytes)
}
len = strnlen(arg, max);
memcpy(dest, arg, len);
dest += len;
/* Null terminate the string */
*dest++ = '\0';
}