Обновление клиента (apps, 3rdparty, install)

This commit is contained in:
root
2026-03-16 08:42:57 +00:00
parent b8905de237
commit f390426546
3354 changed files with 505213 additions and 3 deletions
+26
View File
@@ -0,0 +1,26 @@
From 186b99ac4a57d091e9414c0944524a9e098835f3 Mon Sep 17 00:00:00 2001
From: grnd-alt <github@belakkaf.net>
Date: Mon, 13 Oct 2025 12:18:37 +0200
Subject: [PATCH] fix: break frame parsing on short frame
Signed-off-by: grnd-alt <github@belakkaf.net>
---
src/Mp3Info.php | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/Mp3Info.php b/src/Mp3Info.php
index ccf97f4..24781d7 100644
--- a/src/Mp3Info.php
+++ b/src/Mp3Info.php
@@ -584,6 +584,11 @@ protected function parseId3v23Body($fp, $lastByte) {
$raw = fread($fp, 10);
$frame_id = substr($raw, 0, 4);
+ if (strlen($raw) < 10) {
+ fseek($fp, $lastByte);
+ break;
+ }
+
if ($frame_id == str_repeat(chr(0), 4)) {
fseek($fp, $lastByte);
break;
@@ -0,0 +1,33 @@
From 37365fd60dd3f4a637a887376b32f4d5e05726ce Mon Sep 17 00:00:00 2001
From: wapmorgan <wapmorgan@gmail.com>
Date: Sat, 28 Jun 2025 03:34:24 +0300
Subject: [PATCH] #30 Fix incorrect lookup for mpeg header. Previously it skips
1 extra byte every jump that leads to 50/50% chance to find mpeg header
---
bin/mp3scan | 2 +-
src/Mp3Info.php | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/bin/mp3scan b/bin/mp3scan
index 8f3e28c..6352cc5 100755
--- a/bin/mp3scan
+++ b/bin/mp3scan
@@ -1,4 +1,4 @@
-#!/usr/bin/php
+#!/usr/bin/env php
<?php
use wapmorgan\Mp3Info\Mp3Info;
diff --git a/src/Mp3Info.php b/src/Mp3Info.php
index 17e4074..ccf97f4 100644
--- a/src/Mp3Info.php
+++ b/src/Mp3Info.php
@@ -363,7 +363,6 @@ private function readMpegFrame($fp) {
break;
}
}
- fseek($fp, 1, SEEK_CUR);
} while (ftell($fp) <= $header_seek_pos);
if (!isset($header_bytes) || $header_bytes[0] !== 0xFF || (($header_bytes[1] >> 5) & 0b111) != 0b111) {