Dear Steven Falco, In message <523f979c.1070...@gmail.com> you wrote: > Prevent a crash when PXE boot calls do_bootm with a vmlinuz formatted image. > In this case, there will be a null cmdtp pointer, and we must not dereference > it. ...
> - printf("Wrong Image Format for %s command\n", cmdtp->name); > + if (cmdtp) > + printf("Wrong Image Format for %s command\n", > cmdtp->name); > + else > + printf("Wrong Image Format for command\n"); This is the wrong way to fix it. Instead of handling this here, please fix the place where a NULL pointer is passed incorrectly. Also, the error message "Wrong Image Format for command" makes no sense and gives no help to the user to understand what's wrong. NAK. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Never worry about theory as long as the machinery does what it's supposed to do. - R. A. Heinlein _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot