]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Passwords - a few corrections to the previous commit
authorCiaran Gultnieks <ciaran@ciarang.com>
Fri, 20 May 2011 20:37:13 +0000 (21:37 +0100)
committerCiaran Gultnieks <ciaran@ciarang.com>
Fri, 20 May 2011 20:37:13 +0000 (21:37 +0100)
src/main.cpp
src/server.cpp
src/sha1.cpp
src/sha1.h

index 0b181a36dcee75561aa60a71f3ed4b7db7519dfa..184643b9f2a689e3e85b5f1316b3b9e27ef10ef4 100644 (file)
@@ -1448,6 +1448,7 @@ int main(int argc, char *argv[])
                                                sha1->addBytes(slt.c_str(), slt.length());\r
                                                unsigned char *digest = sha1->getDigest();\r
                                                password = base64_encode(digest, 20);\r
+                                               free(digest);\r
                                }\r
                                else\r
                                {\r
index 051ca85fbdff0ab0d85bff72fe873213c0b4d179..b5cb48a36d15ef21a035b61966273ebda4a9879d 100644 (file)
@@ -1780,7 +1780,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
                if(datasize == 2+1+PLAYERNAME_SIZE)
                {
                        // old version - assume blank password
-                       *password = 0;
+                       password[0] = 0;
                }
                else
                {
index 93df109693b903a02b70b8c5227b3ecbef9fa296..98180adc7ec3aa2a4a1eeb616ca2cfee691a55b5 100644 (file)
@@ -4,8 +4,24 @@ Copyright (c) 2005 Michael D. Leonhard
 
 http://tamale.net/
 
-This file is licensed under the terms described in the
-accompanying LICENSE file.
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
 */
 
 #include <stdio.h>
index 2f92fe8d11d08be7d9ecad95d4fc297d71e2a36b..c04947373e012ca417cbe8ffdf8f9ea566c93484 100644 (file)
@@ -4,8 +4,24 @@ Copyright (c) 2005 Michael D. Leonhard
 
 http://tamale.net/
 
-This file is licensed under the terms described in the
-accompanying LICENSE file.
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
 */
 
 #ifndef SHA1_HEADER