]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - lib/string.c
lib/strscpy: Shut up KASAN false-positives in strscpy()
[mirror_ubuntu-bionic-kernel.git] / lib / string.c
index 288b827e95285e9c11e89cf4abe7ed9b1531d171..72125fd5b4a64dda92169faec990a2a2d4afbc08 100644 (file)
@@ -203,7 +203,7 @@ ssize_t strscpy(char *dest, const char *src, size_t count)
        while (max >= sizeof(unsigned long)) {
                unsigned long c, data;
 
-               c = *(unsigned long *)(src+res);
+               c = read_word_at_a_time(src+res);
                if (has_zero(c, &data, &constants)) {
                        data = prep_zero_mask(c, data, &constants);
                        data = create_zero_mask(data);