We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69ed052 commit 309bac8Copy full SHA for 309bac8
src/AudioTools/CoreAudio/AudioMetaData/MetaDataID3.h
@@ -80,12 +80,13 @@ class MetaDataID3Base {
80
81
/// find the tag position in the string - if not found we return -1;
82
int findTag(const char* tag, const char*str, size_t len){
83
- if (str==nullptr || len<=0) return -1;
+ if (tag==nullptr || str==nullptr || len<=0) return -1;
84
// The tags are usally in the first 500 bytes - we limit the search
85
if (len>1600){
86
len = 1600;
87
}
88
size_t tag_len = strlen(tag);
89
+ if (tag_len >= len) return -1;
90
for (size_t j=0;j<=len-tag_len-1;j++){
91
if (memcmp(str+j,tag, tag_len)==0){
92
return j;
0 commit comments