$OpenBSD: patch-hydra-smbnt_c,v 1.1 2003/12/14 16:35:49 margarida Exp $
--- hydra-smbnt.c.orig	2003-12-13 19:47:49.000000000 -0800
+++ hydra-smbnt.c	2003-12-13 19:47:56.000000000 -0800
@@ -84,6 +84,8 @@ void HashNTLM(u_char **ntlmhash, u_char 
   int                 i=0,j=0;
   int                 mdlen = strlen(pass) * 2 * 8;
   u_char              *p;
+  char                HexChar;
+  int                 HexValue;
   
   /* Use NTLM Hash instead of password */
   if ((miscptr != NULL) && (strcmp(miscptr, "HASH") == 0)) { 
@@ -99,8 +101,6 @@ void HashNTLM(u_char **ntlmhash, u_char 
       exit(1);
     }
 
-    char HexChar;
-    int HexValue;
     for (i=0; i<16; i++) {
       HexValue = 0x0;
       for (j=0; j<2; j++) {
@@ -303,11 +303,12 @@ int SMBSessionSetup(int s, char *user, c
 int start_smbnt(int s, unsigned long int ip, int port, unsigned char options, char *miscptr, FILE *fp) {
   char *empty = "";
   char *login, *pass;
+  int SMBerr;
 
   if (strlen(login = hydra_get_next_login()) == 0) login = empty;
   if (strlen(pass = hydra_get_next_password()) == 0) pass = empty;
 
-  int SMBerr = SMBSessionSetup(s, login, pass, miscptr);
+  SMBerr = SMBSessionSetup(s, login, pass, miscptr);
 
   if ( 0x00 == SMBerr ) {                  // success
     hydra_report_found_host(port, ip, "smb", fp);
