ccrtp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ccrtp-devel] bug in findusername (win32)


From: Federico Montesino Pouzols
Subject: Re: [Ccrtp-devel] bug in findusername (win32)
Date: Fri, 4 Apr 2003 12:34:25 +0200
User-agent: Mutt/1.3.28i

        Ok, your change has been committed to cvs.

On Thu, Apr 03, 2003 at 02:05:49PM +0200, Steindl Christian wrote:
> an access violation occures in ccrtp/src/source.cpp(97):
> 
> static void
> findusername(std::string &username)
> {
> 
>       unsigned long len;
>       GetUserName(NULL,&len);
>       if ( len > 0 ) {
>               char *n = new char[len];         
>               GetUserName(n,&len);
>               username = n;
>               delete [] n;
>       } else {
>               username = "unidentified";
>       }
> }
> 
> I suggest following modification, since the second parameter of GetUserName
> is in/out-parameter:
> 
>       unsigned long len = 0;
>       if (GetUserName(NULL,&len) && ( len > 0 )) {
> 
> sincerely
> -------------------------------------
> Dipl.-Ing. Christian Steindl
> ARC Seibersdorf research GmbH
> 2444 Seibersdorf
> Telefon +43 (0) 50 550 2821
> Fax     +43 (0) 50 550 2831
> Email   address@hidden
> 
> 
> _______________________________________________
> Ccrtp-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/ccrtp-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]