Received files are not retained when the temp file path is 20 characters or longer
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 82/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- backend, embedded-iot
Direzione di ricerca
Leggi fsw/src/cf_cfdp_r.c in corrispondenza dei buffer TempName alle righe 390 e 695, quindi esegui la riproduzione con i numeri di sequenza 9999 e 10000. Conferma che i file ricevuti vengono conservati nelle destinazioni richieste per entrambe le lunghezze dei percorsi; il rapporto afferma che un buffer più grande ha conservato anche la sequenza 123456789.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Checklist (Please check before submitting)
- I reviewed the Contributing Guide.
- I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.
Describe the bug
CF loses a received file when its temp file path is 20 characters or longer.
CF_CFDP_R_Init() gets the temp path in a 20-byte buffer (fsw/src/cf_cfdp_r.c:390), so CF creates the file under a truncated name. CF_CFDP_R_HandleFileRetention() gets the same path in a 64-byte buffer (:695) and tries to move the file from the full path. No file has that name, so the move fails.
With the default tmp_dir (/cf/tmp), this starts at sequence number 10000 for source entity 23. The file does not get to its destination, and its data stays in the temp directory. A class 1 sender gets no error.
To Reproduce
Send two class 1 uploads from entity 23 on channel 0, with sequence numbers 9999 and 10000 and destinations /cf/upl_9999.txt and /cf/upl_10000.txt. CF retains 9999. For 10000 it logs:
CF R1(23:10000): starting transaction using temp file '/cf/tmp/23_10000.tm'
CF R1(23:10000): cannot move file to /cf/upl_10000.txt, error=-1
Expected behavior
CF retains 10000.
Code snips
- char TempName[CFE_MISSION_MAX_FILE_LEN];
+ char TempName[CFE_MISSION_MAX_PATH_LEN];
With this change, CF retained 9999, 10000 and 123456789.
System observed on:
- Raspberry Pi 4, aarch64, cFS v7.0.1 (CF 7.0.1.0).
Reporter Info
Personal
- Lingua principale
- C
- Stelle
- 122
- Fork
- 82
- Merge medio
- 2g 4h
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nasa/CF
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Assert checks non-existent variable (`pt`) in `CF_CFDP_ProcessPlaybackDirectory()`Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertainvalid
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
-
Transaction priority sorted incorrectlyForse già presa @dmknutsen l’ha presa 905 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
CF_Chunks_Insert drops all data after the chunk list fills, so a lossy Class 2 upload is mostly resentForse già presa @SpaceOceanCorp l’ha presa 11 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
python-pillow/Pillow#10590 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
CCExtractor/ccextractor#2478 ·
I maintainer di solito rispondono entro 7 giorni
-
增加kmod-nft-queueAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
ESPresense/ESPresense#2680 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenPrinting/cups#1828 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno