Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000092 [ethersex] Bug minor always 2010-03-22 09:59 2010-03-22 09:59
Reporter big View Status public  
Assigned To
Priority normal Resolution open  
Status new  
Summary 0000092: Schreiben einer existierenden Datei über TFTP auf SD-Karte fehlerhaft.
Description Das Schreiben einer Datei, deren Name identisch ist mit einer schon existierenden Datei im gleichen Verzeichnis auf der SD-Karte, führt zum Anlegen eines zweiten gleich benamten Verzeichniseintrags mit Länge 0. Das Dateisystem ist danach korrupt und muss per CHKDSK repariert werden.
Additional Information Möglicher funktionierender (getestet) Bugfix:
in tftp-vfs.c, in Funktion tftp_handle_packet, Zeile 109

/* try to create the file only if it does not already exist */
    state->fh = vfs_open(pk->u.raw);
    if(!state->fh)
    {
      state->fh = vfs_create (pk->u.raw);
    }else{
      /* file already exists, truncate existing file */
      if(vfs_truncate(state->fh, 0) != 0) goto error_out;
    }

sowie in fat.c in Funktion fat_resize_file, Zeile 1306
    /* correct file position */
    if(size <= fd->pos) // if size is zero, also set file position to zero!
    {
        fd->pos = size;
        fd->pos_cluster = 0;
    }
Tags No tags attached.
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2010-03-22 09:59 big New Issue


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker