@@ -178,11 +178,11 @@ function getXPCData(conn, dict, buff, n) {
178
178
if ( hdr == "bplist15" ) {
179
179
const plist = CFBinaryPlistCreate15 ( buff , n , NULL ) ;
180
180
return ObjC . Object ( plist ) . description ( ) . toString ( ) ;
181
- } else if ( hdr == "bplist17" ) {
181
+ } else if ( hdr == "bplist16" || hdr == " bplist17") {
182
182
if ( conn != null ) {
183
- return parseBPList17 ( conn , dict ) ;
183
+ return parseBPList ( conn , dict ) ;
184
184
} else {
185
- return " cannot parse blplist17 for xpc_handler_t" ;
185
+ return ` cannot parse ${ hdr } for xpc_handler_t` ;
186
186
}
187
187
} else if ( hdr == "bplist00" ) {
188
188
const format = Memory . alloc ( 8 ) ;
@@ -217,11 +217,13 @@ function getKeys(description) {
217
217
}
218
218
219
219
// https://github.com/nst/iOS-Runtime-Headers/blob/master/Frameworks/Foundation.framework/NSXPCDecoder.h
220
- function parseBPList17 ( conn , dict ) {
220
+ function parseBPList ( conn , dict ) {
221
221
var decoder = NSXPCDecoder . alloc ( ) . init ( ) ;
222
222
decoder [ "- set_connection:" ] ( conn ) ;
223
223
decoder [ "- _startReadingFromXPCObject:" ] ( dict ) ;
224
- return decoder . debugDescription ( ) . toString ( ) ;
224
+ var debugDescription = decoder . debugDescription ( ) ;
225
+ decoder . dealloc ( ) ;
226
+ return debugDescription . toString ( ) ;
225
227
}
226
228
227
229
function extract ( conn , xpc_object , dict ) {
0 commit comments