Fix some coverity issues
This commit is contained in:
parent
8af39b8d21
commit
0088a4d3e8
@ -1608,10 +1608,10 @@ void Tag::toString (char* buffer, int ofs)
|
|||||||
std::string Tag::nameToString (int i)
|
std::string Tag::nameToString (int i)
|
||||||
{
|
{
|
||||||
|
|
||||||
char buffer[1024];
|
char buffer[1025];
|
||||||
|
|
||||||
if (attrib) {
|
if (attrib) {
|
||||||
strcpy (buffer, attrib->name);
|
strncpy (buffer, attrib->name, 1024);
|
||||||
} else {
|
} else {
|
||||||
sprintf (buffer, "0x%x", tag);
|
sprintf (buffer, "0x%x", tag);
|
||||||
}
|
}
|
||||||
@ -3115,8 +3115,8 @@ bool extractLensInfo (std::string &fullname, double &minFocal, double &maxFocal,
|
|||||||
maxFocal = 0.0;
|
maxFocal = 0.0;
|
||||||
maxApertureAtMinFocal = 0.0;
|
maxApertureAtMinFocal = 0.0;
|
||||||
maxApertureAtMaxFocal = 0.0;
|
maxApertureAtMaxFocal = 0.0;
|
||||||
char buffer[1024];
|
char buffer[1025];
|
||||||
strcpy (buffer, fullname.c_str());
|
strncpy (buffer, fullname.c_str(), 1024);
|
||||||
char *pF = strstr (buffer, "f/" );
|
char *pF = strstr (buffer, "f/" );
|
||||||
|
|
||||||
if ( pF ) {
|
if ( pF ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user