change add_logininfo_to_buffer
to accept size of data for future use
This commit is contained in:
@@ -48,11 +48,11 @@ void delete_logininfo_from_buffer(Buffer &buffer, int index_of_pass)
|
||||
in_index->offset -= sizeof(LoginInfo);
|
||||
}
|
||||
|
||||
void add_logininfo_to_buffer(Buffer &buffer, const char *label, const char *username, const char *password)
|
||||
void add_logininfo_to_buffer(Buffer &buffer, const char *label, size_t label_size, const char *username, size_t username_size, const char *password, size_t password_size)
|
||||
{
|
||||
uint32_t label_start = buffer.add_end((uint8_t *)label, strlen(label) + 1);
|
||||
uint32_t username_start = buffer.add_end((uint8_t *)username, strlen(username) + 1);
|
||||
uint32_t password_start = buffer.add_end((uint8_t *)password, strlen(password) + 1);
|
||||
uint32_t label_start = buffer.add_end((uint8_t *)label, label_size + 1);
|
||||
uint32_t username_start = buffer.add_end((uint8_t *)username, username_size + 1);
|
||||
uint32_t password_start = buffer.add_end((uint8_t *)password, password_size + 1);
|
||||
|
||||
Index *index = (Index *)buffer.buffer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user