diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-12 10:29:36 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-12 10:29:36 -0700 |
commit | 4970c0cb6aa8996e39b1626887f5fb67a49f5ad1 (patch) | |
tree | 8e734bdf15768744a0ec03fbc715a6404a4f732b /lib/string.c | |
parent | 3c0ed7d56d77b61f2177e8b72855ea32073c2091 (diff) | |
parent | 25cb62b76430a91cc6195f902e61c2cb84ade622 (diff) | |
download | lwn-4970c0cb6aa8996e39b1626887f5fb67a49f5ad1.tar.gz lwn-4970c0cb6aa8996e39b1626887f5fb67a49f5ad1.zip |
Merge 4.3-rc5 into char-misc next
We want the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/string.c')
-rw-r--r-- | lib/string.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/string.c b/lib/string.c index 8dbb7b1eab50..84775ba873b9 100644 --- a/lib/string.c +++ b/lib/string.c @@ -203,12 +203,13 @@ ssize_t strscpy(char *dest, const char *src, size_t count) unsigned long c, data; c = *(unsigned long *)(src+res); - *(unsigned long *)(dest+res) = c; if (has_zero(c, &data, &constants)) { data = prep_zero_mask(c, data, &constants); data = create_zero_mask(data); + *(unsigned long *)(dest+res) = c & zero_bytemask(data); return res + find_zero(data); } + *(unsigned long *)(dest+res) = c; res += sizeof(unsigned long); count -= sizeof(unsigned long); max -= sizeof(unsigned long); |