Comments (6)
What exactly does cppcheck print? It doesn't help if you just post the code lines.
from faac.
@fabiangreffrath say> What exactly does cppcheck print?
git/knik0/faac/common/Cfaac$ cat cppcheck.log
[CRegistry.cpp:209]: (error) Mismatching allocation and deallocation: tempVal
[CRegistry.cpp:229]: (error) Mismatching allocation and deallocation: tempVal
[CRegistry.cpp:345]: (error) Null pointer dereference
from faac.
In the first two cases, replace delete tempVal
with delete[] tempVal
. You are pretty sure right with your fix to the third error.
from faac.
@fabiangreffrath say> You are pretty sure right with your fix to the third error.
See:
faac/common/Cfaac/CRegistry.cpp
Lines 317 to 320 in 40fffb1
faac/common/Cfaac/CRegistry.cpp
Lines 343 to 345 in 40fffb1
Maybe:
int CRegistry::GetSetValN(char *keyStr, BYTE *defData, DWORD defSize, BYTE **dest)
{
long retVal;
DWORD size;
*dest=NULL;
if((retVal=RegQueryValueEx(regKey , keyStr , NULL , NULL, NULL, &size))==ERROR_SUCCESS)
if(*dest=(BYTE *)malloc(size+1))
retVal=RegQueryValueEx(regKey , keyStr , NULL , NULL, (BYTE *)*dest , &size);
if(retVal!=ERROR_SUCCESS)
{
if(*dest)
free(*dest);
if(!defData)
return 0;
size=defSize;
if(!(*dest=(BYTE *)malloc(size)))
return 0;
memcpy(*dest,defData,size);
RegSetValueEx(regKey , keyStr , NULL , REG_BINARY , (BYTE *)*dest , size);
}
return size;
}
?
from faac.
Would you create a PR for this?
from faac.
@fabiangreffrath say> Would you create a PR for this?
No time.
from faac.
Related Issues (20)
- How to read aac file? HOT 1
- Invalid memory address dereference in huffcode (in libfaac/huff2.c:115)
- Invalid memory address dereference in huffcode (in libfaac/huff2.c:132)
- Invalid memory address dereference in huffcode (in libfaac/huff2.c:167)
- Invalid memory address dereference in huffcode (in libfaac/huff2.c:184) HOT 2
- Invalid memory address dereference in huffcode (in libfaac/huff2.c:217)
- Invalid memory address dereference in huffcode (in libfaac/huff2.c:259)
- vs2017 build, error HOT 16
- how to build lib/dll with gcc in mingw, and use lib in msvc
- Time for a 1.30 release HOT 10
- Update the Sorceforge Home / faac-src files to 1.30. HOT 1
- Sample with heavy distortion at default settings (and up to ~160kbps)
- weird audio artifacts HOT 2
- apostrophes show up as � in the encoded file's id3 tag
- Reporting wrong libfaac version HOT 6
- Reduce memory
- Croaking sound after encoding.
- LICENSE? HOT 1
- installation error HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faac.