• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Commit MetaInfo

Revisionac35a3db3bda572427aa0491e1e7416c41feba37 (tree)
Time2021-12-14 23:37:09
Authorumorigu <umorigu@gmai...>
Commiterumorigu

Log Message

BugTrack/2514 PHP8: Avoid error on fread($fp, 0)

Change Summary

Incremental Difference

--- a/plugin/dump.inc.php
+++ b/plugin/dump.inc.php
@@ -462,7 +462,12 @@ class tarlib
462462 // ファイルデータの取得
463463 $fpr = @fopen($name , 'rb');
464464 flock($fpr, LOCK_SH);
465- $data = fread($fpr, $size);
465+ if ($size === 0) {
466+ // Avoid error on fread($fp, 0);
467+ $data = '';
468+ } else {
469+ $data = fread($fpr, $size);
470+ }
466471 flock($fpr, LOCK_UN);
467472 fclose( $fpr );
468473