@@ -93,11 +93,11 @@ function getXPCData(conn, dict, buff, n) {
93
93
if ( hdr == "bplist15" ) {
94
94
const plist = CFBinaryPlistCreate15 ( buff , n , NULL ) ;
95
95
return ObjC . Object ( plist ) . description ( ) . toString ( ) ;
96
- } else if ( hdr == "bplist17" ) {
96
+ } else if ( hdr == "bplist16" || hdr == " bplist17") {
97
97
if ( conn != null ) {
98
- return parseBPList17 ( conn , dict ) ;
98
+ return parseBPList ( conn , dict ) ;
99
99
} else {
100
- return " cannot parse blplist17 for xpc_handler_t" ;
100
+ return ` cannot parse ${ hdr } for xpc_handler_t` ;
101
101
}
102
102
} else if ( hdr == "bplist00" ) {
103
103
const format = Memory . alloc ( 8 ) ;
@@ -132,11 +132,13 @@ function getKeys(description) {
132
132
}
133
133
134
134
// https://github.com/nst/iOS-Runtime-Headers/blob/master/Frameworks/Foundation.framework/NSXPCDecoder.h
135
- function parseBPList17 ( conn , dict ) {
135
+ function parseBPList ( conn , dict ) {
136
136
var decoder = NSXPCDecoder . alloc ( ) . init ( ) ;
137
137
decoder [ "- set_connection:" ] ( conn ) ;
138
138
decoder [ "- _startReadingFromXPCObject:" ] ( dict ) ;
139
- return decoder . debugDescription ( ) . toString ( ) ;
139
+ var debugDescription = decoder . debugDescription ( ) ;
140
+ decoder . dealloc ( ) ;
141
+ return debugDescription . toString ( ) ;
140
142
}
141
143
142
144
function extract ( conn , xpc_object , dict ) {
0 commit comments