#1429 closed defect (fixed)

rtems_tftp_eval_path missing argument

Reported by: Daron Chabot Owned by: Joel Sherrill
Priority: normal Milestone: 4.10
Component: fs Version: 4.10
Severity: normal Keywords:
Cc: ralf.corsepius@… Blocked By:
Blocking:

Description

Check first two frames on stack (from gdb):
(gdb) bt
#0 rtems_tftp_eval_path (pathname=0x2a17d9 "BOOTP_HOST/dchabot/st.sys",

flags=0, pathloc=0x4)
at ../../../../../../rtems-head/c/src/../../cpukit/libnetworking/lib/tftpDriver.c:531

#1 0x000eaf94 in IMFS_eval_path (

pathname=0x2a17d4 "TFTP/BOOTP_HOST/dchabot/st.sys", pathnamelen=15,
flags=4, pathloc=0x2a173c)
at ../../../../../../rtems-head/c/src/../../cpukit/libfs/src/imfs/imfs_eval.c:661

From tftpDriver.c: original function signature

rtems_tftp_eval_path(

const char *pathname, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */

)

is *incorrect*.

The "eval_path" entry in rtems_filesystem_operations_table requires a signature like:

int rtems_tftp_eval_path(

const char *pathname, /* IN */
int pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */

)

Note, this only generates a compiler warning, *not* an error! It is an error at runtime as the caller (IMFS_eval_path) is giving 4 args and the callee is only using the first 3, which are not even in the correct order...

Attachments (1)

tftpDriver.diff (428 bytes) - added by Daron Chabot on Jun 29, 2009 at 5:22:55 PM.
patch on tftpDriver.c to fix eval_path argument list

Download all attachments as: .zip

Change History (2)

Changed on Jun 29, 2009 at 5:22:55 PM by Daron Chabot

Attachment: tftpDriver.diff added

patch on tftpDriver.c to fix eval_path argument list

comment:1 Changed on Aug 11, 2010 at 2:38:51 AM by Ralf Corsepius

Resolution: fixed
Status: newclosed, ralf.corsepius@rtems.org

AFAIS, this was fixed as part of some other fixes, some time ago.

Note: See TracTickets for help on using tickets.