Skip to content

Commit

Permalink
Merge pull request #504 from KomodoPlatform/dev
Browse files Browse the repository at this point in the history
sync beta
  • Loading branch information
ca333 authored Sep 23, 2021
2 parents 4e87589 + db40440 commit 0af3582
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/komodo_structs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ std::ostream& operator<<(std::ostream& os, const event_rewind& in)
event_notarized::event_notarized(uint8_t *data, long &pos, long data_len, int32_t height, const char* _dest, bool includeMoM)
: event(EVENT_NOTARIZED, height), MoMdepth(0)
{
memcpy(this->dest, _dest, sizeof(this->dest)-1);
strncpy(this->dest, _dest, sizeof(this->dest)-1);
this->dest[sizeof(this->dest)-1] = 0;
MoM.SetNull();
mem_read(this->notarizedheight, data, pos, data_len);
Expand All @@ -190,7 +190,7 @@ event_notarized::event_notarized(uint8_t *data, long &pos, long data_len, int32_
event_notarized::event_notarized(FILE* fp, int32_t height, const char* _dest, bool includeMoM)
: event(EVENT_NOTARIZED, height), MoMdepth(0)
{
memcpy(this->dest, _dest, sizeof(this->dest)-1);
strncpy(this->dest, _dest, sizeof(this->dest)-1);
this->dest[sizeof(this->dest)-1] = 0;
MoM.SetNull();
if ( fread(&notarizedheight,1,sizeof(notarizedheight),fp) != sizeof(notarizedheight) )
Expand Down
2 changes: 1 addition & 1 deletion src/komodo_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ struct event_notarized : public event
memset(this->dest, 0, sizeof(this->dest));
}
event_notarized(int32_t ht, const char* _dest) : event(EVENT_NOTARIZED, ht), notarizedheight(0), MoMdepth(0) {
memcpy(this->dest, _dest, sizeof(this->dest)-1); this->dest[sizeof(this->dest)-1] = 0;
strncpy(this->dest, _dest, sizeof(this->dest)-1); this->dest[sizeof(this->dest)-1] = 0;
}
event_notarized(uint8_t* data, long &pos, long data_len, int32_t height, const char* _dest, bool includeMoM = false);
event_notarized(FILE* fp, int32_t ht, const char* _dest, bool includeMoM = false);
Expand Down

0 comments on commit 0af3582

Please sign in to comment.