[PR #2739] [MERGED] Fixed to not call xmlReadMemory if data length is 0 #2757

Closed
opened 2026-03-04 02:07:09 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2739
Author: @ggtakec
Created: 10/11/2025
Status: Merged
Merged: 10/11/2025
Merged by: @gaul

Base: masterHead: fix/xmlparser_error


📝 Commits (1)

  • ed7661d Fixed to not call xmlReadMemory if data length is 0

📊 Changes

2 files changed (+16 additions, -1 deletions)

View changed files

📝 src/s3fs.cpp (+10 -0)
📝 src/s3fs_xml.cpp (+6 -1)

📄 Description

Relevant Issue (if applicable)

#2738 #2737

Details

The error :1: parser error: Document is empty may be output to stderr.
This occurs when calling the following function:

xmlDoc* xmlReadMemory(const char *buffer, int size, const char *URL, const char *encoding, int options)

This error is output when buffer is not nullptr and size is 0. (xmlDoc* returns nullptr.)
Therefore, we now check whether the data length is 0 before calling this function.

This fix is ​​not a workaround for the current CI test failures in Ubuntu 25.10 and other releases.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/2739 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 10/11/2025 **Status:** ✅ Merged **Merged:** 10/11/2025 **Merged by:** [@gaul](https://github.com/gaul) **Base:** `master` ← **Head:** `fix/xmlparser_error` --- ### 📝 Commits (1) - [`ed7661d`](https://github.com/s3fs-fuse/s3fs-fuse/commit/ed7661dac577b873fbe7a62c3af85aa132a1dc72) Fixed to not call xmlReadMemory if data length is 0 ### 📊 Changes **2 files changed** (+16 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/s3fs.cpp` (+10 -0) 📝 `src/s3fs_xml.cpp` (+6 -1) </details> ### 📄 Description ### Relevant Issue (if applicable) #2738 #2737 ### Details The error `:1: parser error: Document is empty` may be output to stderr. This occurs when calling the following function: ``` xmlDoc* xmlReadMemory(const char *buffer, int size, const char *URL, const char *encoding, int options) ``` This error is output when buffer is not nullptr and size is 0. (xmlDoc* returns nullptr.) Therefore, we now check whether the data length is 0 before calling this function. _This fix is ​​not a workaround for the current CI test failures in Ubuntu 25.10 and other releases._ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:07:09 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#2757
No description provided.