Commit f505a45
smb: client: Use snprintf in cifs_set_cifscreds
Replace unbounded sprintf() calls with the safer snprintf(). Avoid using
magic numbers and use strlen() to calculate the key descriptor buffer
size. Save the size in a local variable and reuse it for the bounded
snprintf() calls. Remove CIFSCREDS_DESC_SIZE.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent 2f37dc4 commit f505a45
1 file changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2167 | 2167 | | |
2168 | 2168 | | |
2169 | 2169 | | |
2170 | | - | |
2171 | | - | |
2172 | | - | |
2173 | 2170 | | |
2174 | 2171 | | |
2175 | 2172 | | |
2176 | 2173 | | |
2177 | 2174 | | |
2178 | 2175 | | |
2179 | 2176 | | |
| 2177 | + | |
2180 | 2178 | | |
2181 | 2179 | | |
2182 | 2180 | | |
| |||
2185 | 2183 | | |
2186 | 2184 | | |
2187 | 2185 | | |
2188 | | - | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
2189 | 2189 | | |
2190 | 2190 | | |
2191 | 2191 | | |
2192 | 2192 | | |
2193 | 2193 | | |
2194 | 2194 | | |
2195 | 2195 | | |
2196 | | - | |
| 2196 | + | |
2197 | 2197 | | |
2198 | 2198 | | |
2199 | 2199 | | |
2200 | | - | |
| 2200 | + | |
2201 | 2201 | | |
2202 | 2202 | | |
2203 | 2203 | | |
| |||
2216 | 2216 | | |
2217 | 2217 | | |
2218 | 2218 | | |
2219 | | - | |
| 2219 | + | |
2220 | 2220 | | |
2221 | 2221 | | |
2222 | 2222 | | |
| |||
0 commit comments