Hans Leidekker : dnsapi: Fix a buffer overrun (Coverity).

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jul 11 06:10:27 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: dfd22085bb2bb2c85d8895aad2471b5f2d278bac
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=dfd22085bb2bb2c85d8895aad2471b5f2d278bac

Author: Hans Leidekker <hans at it.vu.nl>
Date:   Mon Jul 10 22:18:50 2006 +0200

dnsapi: Fix a buffer overrun (Coverity).

---

 dlls/dnsapi/query.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/dnsapi/query.c b/dlls/dnsapi/query.c
index 2bcd913..4c95b9d 100644
--- a/dlls/dnsapi/query.c
+++ b/dlls/dnsapi/query.c
@@ -496,7 +496,7 @@ static DNS_STATUS dns_do_query_netbios( 
 
     memset( ncb.ncb_callname, ' ', sizeof(ncb.ncb_callname) );
     memcpy( ncb.ncb_callname, name, len );
-    ncb.ncb_callname[NCBNAMSZ] = '\0';
+    ncb.ncb_callname[NCBNAMSZ - 1] = '\0';
 
     ret = Netbios( &ncb );
     if (ret != NRC_GOODRET) return ERROR_INVALID_NAME;




More information about the wine-cvs mailing list