mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
registry: Fix CID 240989 Buffer not null terminated
This makes it clearer that we don't really have a string in .hdr Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
This commit is contained in:
parent
101b047ab0
commit
f6a75cf4d1
@ -187,7 +187,7 @@ _PUBLIC_ WERROR reg_preg_diff_save(TALLOC_CTX *ctx, const char *filename,
|
||||
data->fd = STDOUT_FILENO;
|
||||
}
|
||||
|
||||
strncpy(preg_header.hdr, "PReg", 4);
|
||||
memcpy(preg_header.hdr, "PReg", sizeof(preg_header.hdr));
|
||||
SIVAL(&preg_header.version, 0, 1);
|
||||
write(data->fd, (uint8_t *)&preg_header, sizeof(preg_header));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user