bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Re: [bug-inetutils] inetutils-1.6 rshd error


From: wyh
Subject: Re: Re: Re: [bug-inetutils] inetutils-1.6 rshd error
Date: Wed, 13 May 2009 17:26:45 +0800

======== original message ========

Would you like to try and fix libinetutils/argcv.c so that it uses
size_t instead?  That would be the correct fix.

==================================

this way influence all caller of argcv_get()
address@hidden inetutils-1.6]#  grep -r argcv_get  .
./telnetd/pty.c:  argcv_get (cmd, "", &argc, &argv);
./telnetd/telnetd.h:extern int argcv_get (const char *command, const char 
*delim,
./talkd/acl.c:      argcv_get (ptr, "", &argc, &argv);
./inetd/inetd.c:      if (argcv_get (linebuf, "", &argc, &argv))
./libinetutils/argcv.c:argcv_get (const char *command, const char *delim, int 
*argc, char ***argv)
./libinetutils/argcv.c:  argcv_get (command, "=", &argc, &argv);
./libinetutils/argcv.h:  extern int argcv_get (const char *command, const char 
*delim,

in telnetd/pty.c and talkd/acl.c, there are  "int *" passed to argcv_get().
if fix libinetutils/argcv.c by change 
argcv_get (const char *command, const char *delim, int *argc, char ***argv)
to
argcv_get (const char *command, const char *delim, size_t *argc, char ***argv)
telnetd/pty.c and talkd/acl.c should fix too.

another way is to fix inetd/inetd.c like i wrote in last mail,in this way only 
one line fixd.
it generates compile warning : assignment int to size_t like this:
inetd/inetd.c line 1232: sep-> se_argc = argc - INETD_FIELDS_MIN + 1;
but it is safe coercion.
i think this way is beterr.


              wyh
                          address@hidden
                 2009-05-13


reply via email to

[Prev in Thread] Current Thread [Next in Thread]