CVE-2021-4280 (published 2022-12-25T20:15Z)

A vulnerability was found in styler_praat_scripts. It has been classified as problematic. Affected is an unknown function of the file file_segmenter.praat of the component Slash Handler. The manipulation leads to denial of service. It is possible to launch the attack remotely. The name of the patch is 0cad44aa4a3eb0ecdba071c10eaff16023d8b35f. It is recommended to apply a patch to fix this issue. The identifier of this vulnerability is VDB-216780.

CVSS v3 base score: 6.5, MEDIUM (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H)

Weakness information:
cwe_id: CWE-404
cwe_name: Improper Resource Shutdown or Release
description: The product does not release or incorrectly releases a resource before it is made available for re-use.
extended_description: When a resource is created or allocated, the developer is responsible for properly releasing the resource as well as accounting for all potential paths of expiration or invalidation, such as a set period of time or revocation.
         

Fix information:
repo_url: https://github.com/stylerw/styler_praat_scripts
commit_details: repo_url: https://github.com/stylerw/styler_praat_scripts
author: Will Styler
author_date: 2021-11-24 09:37:08-08:00
msg: Improved File Segmenter

It should now be less vulnerable to certain characters in Textgrids (e.g. /) crashing everything.
repository: repo_url: https://github.com/stylerw/styler_praat_scripts
repo_name: stylerw/styler_praat_scripts
description: This is a collection of Praat scripts, written, modified, or used by Will Styler, which he finds useful and thinks you might too!
owner: stylerw
file_changes: filename: file_segmenter.praat
change_type: ModificationType.MODIFY
diff: @@ -27,7 +27,7 @@
 
 form Chopping long sound files
    comment Specify which tier in the TextGrid you want to segment by:
-        integer tier_number 2
+        integer tier_number 3
    comment Sound file extension:
         optionmenu file_type: 2
         option .aiff
@@ -68,18 +68,23 @@ for j from 1 to number_of_files
 			            select Sound 'soundname$'
 			            Extract part: start, end, "rectangular", 1, "no"
 						if namebase$ <> ""
-			            	out_filename$ = "'out_dir$''namebase$'_'seg_label$'"
+			            	writename$ = "'namebase$'_'seg_label$'"
 						else
-			            	out_filename$ = "'out_dir$''soundname$'_'seg_label$'"
+			            	writename$ = "'soundname$'_'seg_label$'"
 						endif
+						# Although you should use ASCII when making textgrids, this bit removes some instacrashes
+						writename$ = replace$ (writename$, " ", "_", 0)
+						writename$ = replace$ (writename$, "/", "_", 0)
+						out_filename$ = "'out_dir$''writename$'"
 						# initialize anti-collision counter.
-			            aff = 1
+			        aff = 1
 						name$ = "'out_filename$'_'aff'"
-			            while fileReadable ("'name$'.wav")
-							#out_filename$ = "'out_dir$''soundname$'-'seg_label$'-'k'"
+
+						#writeInfo: name$
+			        while fileReadable ("'name$'.wav")
 							aff = aff + 1
 							name$ = "'out_filename$'_'aff'"
-			            endwhile
+			        endwhile
 			            Write to WAV file... 'name$'.wav
 			            select TextGrid 'soundname$'
 			            Extract part... 'start' 'end' no

programming_language: Ruby
filename: nasal_earbud_extract.praat
change_type: ModificationType.MODIFY
diff: @@ -245,7 +245,7 @@ for ifile to number_files
 			vwlpct = ((timepoint-intstart)/intdur)*100
 			
 			result_row$ = "'soundname$'" + tab$ + "'point'" + tab$ + "'vwlpct:2'" + tab$ + "'naspasc:10'" + tab$ + "'orpasc:10'" + tab$ + "'percnas:5'" + tab$ + "'timepoint:4'" + newline$
-			#fileappend "'resultfile$'" 'result_row$'
+			fileappend "'resultfile$'" 'result_row$'
 			
 		endfor
 	else

programming_language: CoffeeScript