Don't null terminate the first byte of the appended command line...
This commit is contained in:
parent
0d2d0bf0d2
commit
bb176a0b85
2 changed files with 7 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue