extlinux: Avoid dereferencing a garbage pointer

If opt.reset_adv is set the call to ext_read_adv() is skipped which
would have initialised 'filename'. This means that a pointer
containing random data from the stack is passed to ext_write_adv().

Just delete the opt.reset_adv logic since modify_adv() handles that
case anyway.

Reported-by: Frediano Ziglio <frediano.ziglio@citrix.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
fs: Fix searchdir resource leak

This is a significant rewrite of the generic lookup logic inside
core/fs/fs.c's searchdir function.  Previously, there was a
memory leak if a path involved multiple directories.  After a
sufficiently large number of invocations, this could be observed.

Reported-by: Ady <ady-sf@hotmail.com>
Signed-off-by: Shao Miller <sha0.miller@gmail.com>
Merge branch 'searchdir_leak-406' of git://git.zytor.com/users/sha0/syslinux into stable

Pull a change that fixes a resource leak from Shao Miller,

* 'searchdir_leak-406' of git://git.zytor.com/users/sha0/syslinux:
  fs: Fix searchdir resource leak
isolinux: Update LBA in getlinsec loop

We need to increment the Logical Block Address in eax by the number of
sectors we passed to getlinsec after every invocation, otherwise we'll
start with the same sector everytime.

This bug was discovered when booting an isohybrid image, which failed
to boot after printing the following error,

    "Image checksum error, sorry..."

because the isolinux.bin was bigger than 32K, and thus invoked the
getlinsec loop that reads the file in chunks.

Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
menugen: Make it compatible with Py3k

Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
version: bump version and date

Welcome to the 4.07 release cycle

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
NEWS: document changes in 4.07

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
isolinux: Clear upper half of EDX before using

In checkin:

    cb015497a4e4 isolinux: Update LBA in getlinsec loop

... we use EDX as a sector count, but the sector count is actually in
DX, and the upper half of EDX is uninitialized.  If the BIOS enters
with a nonzero value in the upper half of EDX, this breaks horribly.

At least one set of BIOSes has been identified where if the LBA > 64K
then the upper half of EDX will be nonzero.

Reported-by: Carl Duff <cdrw2400@gmail.com>
Reported-by: Philip Müller <philm@manjaro.org>
Tested-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Remove some whitespace

Signed-off-by: Ruben Kerkhof <ruben at rubenkerkhof.com>
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
diag/geodsp: fix Makefile

Results in null image

Reported-By: ioannis
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
diag/geodsp: README fixes

Should clarify the situation; also word-wrap & save example

Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
Merge branch 'master' into elflink

Resolved Conflicts:
	NEWS
	core/fs/fs.c
	version

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
version: Update year to 2014

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>