Zandronum Chat @ irc.zandronum.com
#zandronum
Get the latest version: 3.0
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003855Zandronum[All Projects] Suggestionpublic2020-08-10 19:052020-08-10 19:05
ReporterFilystea 
Assigned To 
PrioritynoneSeverityfeatureReproducibilityalways
StatusnewResolutionopen 
PlatformopenbdsmOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003855: Somehow on Linux this was never poping out.
Description

Each time i compile I hit this.
upnpnat/xmlParser.c│;
pp:663:27: error:
      cast from pointer to smaller type 'char' loses
      information
        lpszNew[cbData] = (TCHAR)NULL

HERE:

// Duplicate a given string.
LPTSTR stringDup(LPCTSTR lpszData, int cbData)
{
    if (lpszData==NULL) return NULL;

    LPTSTR lpszNew;
    if (cbData==0) cbData=(int)_tcslen(lpszData);
    lpszNew = (LPTSTR)malloc((cbData+1) * sizeof(TCHAR));
    if (lpszNew)
    {
        memcpy(lpszNew, lpszData, (cbData) * sizeof(TCHAR));

// Here was NULL instead of '\0'
        lpszNew[cbData] = (TCHAR)'\0';


    }
    return lpszNew;
}



Feels like I hit some forgotten code.
Steps To ReproduceCumpile
Additional InformationGod forbid
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2020-08-10 19:05 Filystea New Issue






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker