Parcourir la source

Sicherheitslücke geschlossen

Kolja Strohm il y a 6 ans
Parent
commit
8457aa7841
1 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 5 5
      PatchServer/PatchServer.cpp

+ 5 - 5
PatchServer/PatchServer.cpp

@@ -599,14 +599,14 @@ void PSAKlient::thread()
                 if( 1 )
                 {
                     klient->sendeEncrypted( "\1", 1 );
-                    char len = 0;
-                    klient->getNachrichtEncrypted( &len, 1 );
+                    unsigned char len = 0;
+                    klient->getNachrichtEncrypted( (char*)&len, 1 );
                     char *n = new char[ len + 1 ];
                     n[ (int)len ] = 0;
                     if( len )
                         klient->getNachrichtEncrypted( n, len );
-                    char pLen = 0;
-                    klient->getNachrichtEncrypted( &pLen, 1 );
+                    unsigned char pLen = 0;
+                    klient->getNachrichtEncrypted( (char*)&pLen, 1 );
                     char *p = new char[ pLen + 1 ];
                     p[ (int)pLen ] = 0;
                     if( pLen )
@@ -937,7 +937,7 @@ void PSAKlient::thread()
                     int version = 0;
                     klient->getNachrichtEncrypted( (char*)&version, 4 );
                     Text *sName = ps->zDB()->getSystemName( system );
-                    short len = 0;
+                    unsigned short len = 0;
                     klient->getNachrichtEncrypted( (char*)&len, 2 );
                     char *pfad = new char[ len + 1 ];
                     pfad[ len ] = 0;