[mime] Fix the use of MIME images without an explicit encoding

The Content-Transfer-Encoding header is optional: if not present then
the default "7bit" encoding should be assumed.  iPXE already includes
logic to set a default encoding name, but the default encoding name
then fails to match against any entries in the known encodings list
since it is terminated with a NUL (rather than with the semicolon or
whitespace character that would terminate the encoding name found
within a Content-Transfer-Encoding header).

Fix by removing the default encoding name and instead treating a NULL
encoding name as indicating that the default encoding should be used,
and add a test case that omits the Content-Transfer-Encoding header.

Reported-by: Huzaifa Ali Zar <zar@amazon.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2 files changed
tree: d19152cf7876f3885999777ab192b2c0334ccdf0
  1. .github/
  2. contrib/
  3. src/
  4. CHANGELOG.md
  5. CONTRIBUTING.md
  6. COPYING
  7. COPYING.GPLv2
  8. COPYING.UBDL
  9. README.md
  10. RELEASE.md
  11. RELNOTES.tmpl.md
README.md

iPXE network bootloader

Build Coverity Release

iPXE is the leading open source network boot firmware. It provides a full PXE implementation enhanced with additional features such as:

  • boot from a web server via HTTP or HTTPS,

  • boot from an iSCSI, FCoE, or AoE SAN,

  • control the boot process with a script,

  • create interactive forms and menus.

You can use iPXE to replace the existing PXE ROM on your network card, or you can chainload into iPXE to obtain the features of iPXE without the hassle of reflashing.

iPXE is free, open-source software licensed under the GNU GPL (with some portions under GPL-compatible licences).

You can download the rolling release binaries (built from the latest commit), or use the most recent stable release.

For full documentation, visit the iPXE website.