Commit bef59f1
committed
Check if
The issue was that the `HTTP_X_AMZ_COPY_SOURCE` header could be present but empty (i.e., an empty string rather than NULL). The code only checked if the pointer was not NULL, but didn't verify that the string had content. When an empty string was passed to RGWCopyObj::parse_copy_location(), it would eventually try to access name_str[0] on an empty string, causing a crash.
Fixes: https://tracker.ceph.com/issues/72669
Signed-off-by: Suyash Dongre <[email protected]>HTTP_X_AMZ_COPY_SOURCE header is empty1 parent 1f34c27 commit bef59f1
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5426 | 5426 | | |
5427 | 5427 | | |
5428 | 5428 | | |
| 5429 | + | |
| 5430 | + | |
| 5431 | + | |
5429 | 5432 | | |
5430 | 5433 | | |
5431 | 5434 | | |
| |||
0 commit comments