Tracking down a memory error.
The store memory address is being overrun in the call to `<<`.
This commit is contained in:
15
TLV.h
15
TLV.h
@@ -5,6 +5,8 @@
|
||||
|
||||
#include "Arena.h"
|
||||
|
||||
using namespace klib;
|
||||
|
||||
|
||||
#ifndef TLV_MAX_LEN
|
||||
#define TLV_MAX_LEN 253
|
||||
@@ -14,6 +16,7 @@
|
||||
#define TAG_EMPTY 0
|
||||
|
||||
|
||||
namespace klib {
|
||||
namespace TLV {
|
||||
|
||||
|
||||
@@ -23,18 +26,17 @@ struct Record {
|
||||
char Val[TLV_MAX_LEN];
|
||||
};
|
||||
|
||||
|
||||
uint8_t *WriteToMemory(Arena &, uint8_t *, Record &);
|
||||
void ReadFromMemory(Record &, uint8_t *);
|
||||
void SetRecord(Record &, uint8_t, uint8_t, const char *);
|
||||
void DeleteRecord(Arena &, uint8_t *);
|
||||
|
||||
/*
|
||||
* returns a pointer to memory where the record was found,
|
||||
* e.g. LocateTag(...)[0] is the tag of the found record.
|
||||
* FindTag will call LocateTag and then SkipRecord if the
|
||||
* tag was found.
|
||||
*/
|
||||
* returns a pointer to memory where the record was found,
|
||||
* e.g. LocateTag(...)[0] is the tag of the found record.
|
||||
* FindTag will call LocateTag and then SkipRecord if the
|
||||
* tag was found.
|
||||
*/
|
||||
uint8_t *FindTag(Arena &, uint8_t *, Record &);
|
||||
uint8_t *LocateTag(Arena &, uint8_t *, Record &);
|
||||
|
||||
@@ -43,6 +45,7 @@ uint8_t *SkipRecord(Record &, uint8_t *);
|
||||
|
||||
|
||||
} // namespace TLV
|
||||
} // namespace klib
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user