Zitat:
Zitat von Beatinu Noch was: Bei mir war es so, dass der Versatz erst beim Auslesen der .mo-Revision aufgetaucht ist. Wenn das zuverlässig sein sollte, könnte man bei $revision != 0 statt substr() my_substr() aufrufen. Sehr sehr unschön, aber eine Möglichkeit. |
Das schau ich mir mal an. Hier nur Ablauf, rekonstruiert, wie er bei Infected auftritt:
Original Fehlerbild von Infected:
Code:
Warning: unpack() [function.unpack]: Type V: not enough input, need 4, have 0 in /www/htdocs/xxx/test2/wp-includes/gettext.php on line 91
Warning: unpack() [function.unpack]: Type V: not enough input, need 4, have 0 in /www/htdocs/xxx/test2/wp-includes/gettext.php on line 91
Fatal error: Maximum execution time of 30 seconds exceeded in /www/htdocs/xxx/test2/wp-includes/gettext.php on line 166
Mo-File einlesen:
1. streams.php fread() ganzer Fileinhalt
2. gettext.php Zeile: 122
$magic = $this->readint();
Byteorder ermitteln
3. gettext.php Zeile: 133
$revision = $this->readint();
Revision lesen
4. gettext.php Zeile: 135 - 137
$this->total = $this->readint();
$this->originals = $this->readint();
$this->translations = $this->readint();
Anzahl totaler Einträge lesen (int)
Anzahl der originale Lesen (int)
Anzahl der Übersetzungen lesen (int)
5. gettext.php Zeile: 257
$this->load_tables();
erster Aufruf lädt die Tabellen
6. gettext.php Zeile: 154 - 157
$this->STREAM->seekto($this->originals);
$this->table_originals = $this->readintarray($this->total * 2);
$this->STREAM->seekto($this->translations);
$this->table_translations = $this->readintarray($this->total * 2);
Original und Übersetzungtabellen arrays laden
7. gettext.php Zeile: 166
$translation = $this->STREAM->read($this->table_translations[$i * 2 + 1]);
Translation Eintrag lesen
Da er in gettext.php Zeile 166 nach 30 Sekunden hart beendet wurde, muß die Schleife, deren Zähler in 4.)
gelesen wurde, noch immer laufen, weil die Anzahl Einträge massiv groß ist, Zeile: 162
for ($i = 0; $i < $this->total; $i++) {
Nachtrag: Mofile Anfang:
DE 12 04 95 00 00 00 00 5E 08 00 00 1C 00 00 00
0C 43 00 00 29 0B 00 00 FC 85 00 00 00 00 00 00
$magic = 0x950412DE
$revision = 0x00000000
$this->total = 0x0000085E (Anzahl: 2142, ok)
$this->originals = 0x0000001C (Offset: 28 Bytes)
$this->translations = 0x0000430C (Offset: 17164 Bytes)
16164 - 28 Bytes = 17136 Byte / 2142 Einträge = 8 Bytes Breite = 4 Byte Offset + 4 Byte Länge