Andre Oppermann:
> Hello LDAP fans

Hello all.

i am a user of pbs tools, and my friend told me there are small bugs
in them. i checked the new source code and found it is true.

pbsadd.c

main() and setup()
if ( len == 0 && len > 15 ) die_...
sould be
if ( len == 0 || len > 15 ) die_...

setup()
if (control_readint(&serverport,"control/pbsport") == -1) die_control();
should be
if (control_readint(&serverport,"control/pbsport") != 1) die_control();

addenv()
    *buf++ = vlen + elen + 1; len++;
    if ( len + elen + vlen + 2 > 1024 ) {
      log_envsize();
      return olen;
    }
assignment to *buf should be after "if (...)"
and the similar check code after here can be omitted.

sendrequest()
please try htons().


and there are the similar points in pbscheck.c too.


Junjiro Okajima

Reply via email to