]> git.sur5r.net Git - openldap/commitdiff
ITS#8195 fix ITS#7027 regression, port number sign bit overflow
authorHoward Chu <hyc@openldap.org>
Sun, 12 Jul 2015 10:14:33 +0000 (11:14 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 28 Jul 2015 15:48:41 +0000 (10:48 -0500)
Another bug from 5de85b922aaa5bfa6eb53db6000adf01ebdb0736

libraries/libldap/dnssrv.c

index da89b4a26983dbc68c921ef54d51bef52e28419f..e4c6580320ad44efb5f22f5486b4d25a65add980 100644 (file)
@@ -399,7 +399,7 @@ add_size:;
         if(cur>0){
             hostlist[cur++]=' ';
         }
-        cur += sprintf(&hostlist[cur], "%s:%hd", hostent_head[i].hostname, hostent_head[i].port);
+        cur += sprintf(&hostlist[cur], "%s:%hu", hostent_head[i].hostname, hostent_head[i].port);
     }
     }