patch-src_slurp_c 904 B

12345678910111213141516171819202122232425262728293031
  1. $OpenBSD: patch-src_slurp_c,v 1.3 2017/05/06 17:23:10 naddy Exp $
  2. Index: src/slurp.c
  3. --- src/slurp.c.orig
  4. +++ src/slurp.c
  5. @@ -149,7 +149,7 @@ char *do_gdict( u_char *master_msg, u_char *sendbuf, u
  6. salt[2] = '\0';
  7. // run generated password search
  8. - for( i=0; i<pwdlen; testpwd[i]=wl.cset[state[i++]] );
  9. + for( i=0; i<pwdlen; testpwd[i]=wl.cset[state[i]], i++ );
  10. if(pwdlen>cfg.gtask_level)
  11. pwdlen=cfg.gtask_level;
  12. for( i=0; i<pwdlen; )
  13. @@ -239,7 +239,7 @@ int cl_proc( int argc, u_char **argv )
  14. if(argc>1)
  15. {
  16. - if( !(*node_port=atoi(argv[--argc])) )
  17. + if( !(*node_port=htons(atoi(argv[--argc]))) )
  18. goto jCOMM_HELP;
  19. for( i=1; i<argc; i++ )
  20. @@ -287,6 +287,6 @@ void print( const u_char *str, ... )
  21. vsprintf(tbuf,str,parg);
  22. va_end(parg);
  23. if( cfg.cl & CL_VERBOSE )
  24. - printf( tbuf );
  25. + printf( "%s", tbuf );
  26. }