mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
Experiment of notification via NotifyClient + JSON API
This commit is contained in:
parent
130007b578
commit
1bc518041c
5 changed files with 142 additions and 50 deletions
|
@ -244,9 +244,10 @@ bool getRawString(const void *data, uint32_t size, uint32_t *offset, std::string
|
|||
}
|
||||
|
||||
/* check there is space for string */
|
||||
if(len > size || size-len < *offset) // better than if(size < *offset + len) because it avoids integer overflow
|
||||
if(len > size || size-len < *offset) // better than if(size < *offset + len) because it avoids integer overflow
|
||||
{
|
||||
std::cerr << "getRawString() not enough size" << std::endl;
|
||||
std::cerr << "getRawString() not enough size" << std::endl;
|
||||
print_stacktrace();
|
||||
return false;
|
||||
}
|
||||
uint8_t *buf = &(((uint8_t *) data)[*offset]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue