public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] fs/fs.c - error handling needed?
@ 2013-10-05 19:49 Wolfgang Denk
  2013-10-07 12:12 ` Tom Rini
  2013-10-08 16:58 ` Simon Glass
  0 siblings, 2 replies; 5+ messages in thread
From: Wolfgang Denk @ 2013-10-05 19:49 UTC (permalink / raw)
  To: u-boot

Dear Simon,

with commit a8f6ab5 "fs: Add support for saving data to filesystems"
you add the function do_save() to U-Boot.  This includes the following
code (line numbers as of current master):

"fs/fs.c":

...
331         filename = argv[3];
332         addr = simple_strtoul(argv[4], NULL, cmdline_base);
333         bytes = simple_strtoul(argv[5], NULL, cmdline_base);
334         if (argc >= 7)
335                 pos = simple_strtoul(argv[6], NULL, cmdline_base);
336         else
337                 pos = 0;


Should we not perform at least minimal error checking, i. e. verify
that no garbage arguments have been passed to that function?

Best regards,
Viele Gr??e,

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: wd at denx.de
The easiest way to figure the cost of living is to take  your  income
and add ten percent.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-10-08 16:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-05 19:49 [U-Boot] fs/fs.c - error handling needed? Wolfgang Denk
2013-10-07 12:12 ` Tom Rini
2013-10-07 13:55   ` Wolfgang Denk
2013-10-07 14:23     ` Tom Rini
2013-10-08 16:58 ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox