mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2026-01-17 18:51:05 +00:00
cmap_iter_next in contrast of it's icmap counterpart copies key name into user preallocated space. In the worst case, key name may be CMAP_KEYNAME_MAXLEN, so cmap_iter_next then need CMAP_KEYNAME_MAXLEN + additional byte to store zero. strncpy was copying only CMAP_KEYNAME_MAXLEN characters so there was possibility of unterminated string. Patch solves this by using memcpy and always add trailing zero. Documentation was improved suggesting minimum size of keyname buffer to be CMAP_KEYNAME_MAXLEN + 1. Also sam and quorumtool were using too short buffer so they are fixed too. Signed-off-by: Jan Friesse <jfriesse@redhat.com> Reviewed-by: Christine Caulfield <ccaulfie@redhat.com> |
||
|---|---|---|
| .. | ||
| cfg.c | ||
| cmap.c | ||
| cpg.c | ||
| libcfg.versions | ||
| libcfg.verso | ||
| libcmap.versions | ||
| libcmap.verso | ||
| libcpg.versions | ||
| libcpg.verso | ||
| libquorum.versions | ||
| libquorum.verso | ||
| libsam.versions | ||
| libsam.verso | ||
| libvotequorum.versions | ||
| libvotequorum.verso | ||
| Makefile.am | ||
| quorum.c | ||
| sam.c | ||
| util.h | ||
| votequorum.c | ||