Changeset 104444 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Apr 26, 2024 2:08:06 PM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r101472 r104444 2636 2636 size_t cbBufferedOvf; 2637 2637 int vrc = RTVfsIoStrmReadAll(hVfsIosOvf, &pvBufferedOvf, &cbBufferedOvf); 2638 /* 2639 * Get rid of trailing zeros if xml is encoded in UTF-8 only. This is needed because 2640 * starting with libxml2 2.12.6 the parser will complain about extra zeroes beyond 2641 * the xml string content. 2642 */ 2643 size_t cbValidXmlBufLen = cbBufferedOvf; 2644 if (*(uint8_t*)pvBufferedOvf == 0x3C) 2645 cbValidXmlBufLen = RTStrNLen((const char *)pvBufferedOvf, cbBufferedOvf); 2638 2646 uint32_t cRefs = RTVfsIoStrmRelease(hVfsIosOvf); /* consumes stream handle. */ 2639 2647 NOREF(cRefs); … … 2645 2653 try 2646 2654 { 2647 m->pReader = new ovf::OVFReader(pvBufferedOvf, cb BufferedOvf, pTask->locInfo.strPath);2655 m->pReader = new ovf::OVFReader(pvBufferedOvf, cbValidXmlBufLen, pTask->locInfo.strPath); 2648 2656 hrc = S_OK; 2649 2657 }
Note:
See TracChangeset
for help on using the changeset viewer.