atomicparsley icon indicating copy to clipboard operation
atomicparsley copied to clipboard

Attempt to fix buffer overflows with rDNS tags

Open ocococococ opened this issue 2 years ago • 2 comments

As asked, I created this PR with a test_reverseDNS.sh script to test adding many rDNS tags to already provided issue-32.mp4.

Without this patch, there are still buffer overflows. Corresponding ASAN report is already uploaded here: https://github.com/wez/atomicparsley/issues/62

ocococococ avatar Jan 13 '23 20:01 ocococococ

FYI, as I am mostly a Mac user, and with latest commit, binary output of rDNS tags appears identical to those generated by tools like Subler or Musicbrainz Picard. Moreover, It also seems ok with freyr-js regarding these comments before replacing AtomicParsley by lofty-rs. Finally, I managed to check that even under Windows, it seems to work too.

ocococococ avatar Jan 16 '23 09:01 ocococococ

Without this patch AtomicParsley on Apple Silicon native corrupts files when using --rDNSatom

% sh redo
Before and after tagging with /tmp/AtomicParsley.brew
197632 -rw-r--r--@ 1 jimmy  staff  93658182  8 Jun 09:37 movie.mp4
4196048 -rw-r--r--@ 1 jimmy  staff  2148376318  8 Jun 09:37 movie.mp4
Before and after tagging with /tmp/AtomicParsley.arm
182928 -rw-r--r--@ 1 jimmy  staff  93658182  8 Jun 09:37 movie.mp4
182664 -rw-r--r--@ 1 jimmy  staff  93521292  8 Jun 09:37 movie.mp4
% cat redo
AP1=/tmp/AtomicParsley.brew
AP2=/tmp/AtomicParsley.arm
f=movie.mp4
for AP in "$AP1" "$AP2"
do
    cp /tmp/$f .
    echo Before and after tagging with $AP
    ls -sl $f
    $AP "$f" --overWrite --metaEnema --artwork REMOVE_ALL  \
--rDNSatom "<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist PUBLIC '-//Apple//DTD PLIST 1.0//EN' 'http://www.apple.com/DTDs/PropertyList-1.0.dtd'>
<plist version='1.0'>
<dict>
	<key>cast</key>
	<array>
		<dict>
			<key>name</key>
			<string>Peter Pepper</string>
		</dict>
	</array>
</dict>
</plist>" name="iTun" domain="com.apple.iTunes" \
--stik 'Movie' \
--title 'Diamond' \
--year '2010-03-18-T12:00:00Z' --freefree >/dev/null 2>&1
    ls -sl $f
done

ghjimmy avatar Jun 08 '23 08:06 ghjimmy

Resolved by https://github.com/wez/atomicparsley/pull/71

wez avatar Jun 08 '24 15:06 wez