#define INVALID_UINT_VALUE 0xFFFFFFFF
#define INVALID_UINT8_VALUE 0xFF
+#define ID3TAG_V110_TRACK_NUM_DIGIT 5
+
typedef struct _mmfilemp4basicboxheader {
unsigned int size;
unsigned int type;
}
if (pInfo->tagV2Info.bTrackNumMarked == false) {
- pInfo->pTrackNum = mmfile_malloc(5);
+ pInfo->pTrackNum = mmfile_malloc(ID3TAG_V110_TRACK_NUM_DIGIT);
if (pInfo->pTrackNum != NULL) {
- pInfo->pTrackNum[4] = 0;
- snprintf(pInfo->pTrackNum, 4, "%04d", (int)buffer[126]);
+ pInfo->pTrackNum[ID3TAG_V110_TRACK_NUM_DIGIT - 1] = 0;
+ snprintf(pInfo->pTrackNum, ID3TAG_V110_TRACK_NUM_DIGIT, "%04d", (int)buffer[126]);
pInfo->tracknumLen = strlen(pInfo->pTrackNum);
debug_msg(RELEASE, "pInfo->pTrackNum returned =(%s), pInfo->tracknumLen(%d)\n", pInfo->pTrackNum, pInfo->tracknumLen);