提交 619e5e3d 编写于 作者: N nico-lius 提交者: LINGuanRen

fix a coredump problem caused by a null pointer.

上级 c4a5e5d4
......@@ -1960,7 +1960,10 @@ int ObStorageOssAppendWriter::do_write(const char* buf, const int64_t size, cons
} else {
if (0 != aos_status_is_ok(aos_ret)) { // != 0 means ok
char* object_type = (char*)(apr_table_get(resp_headers, OSS_OBJECT_TYPE));
if (0 != strncmp(OSS_OBJECT_TYPE_APPENDABLE, object_type, strlen(OSS_OBJECT_TYPE_APPENDABLE))) {
if (OB_ISNULL(object_type)) {
ret = OB_OSS_ERROR;
OB_LOG(ERROR, "oss type is null", K(ret));
} else if (0 != strncmp(OSS_OBJECT_TYPE_APPENDABLE, object_type, strlen(OSS_OBJECT_TYPE_APPENDABLE))) {
ret = OB_OSS_ERROR;
OB_LOG(WARN, "oss object not match", K(ret), K(object_type));
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册