gpt4 book ai didi

python - gammu 恢复期间检测到缓冲区溢出

转载 作者:太空宇宙 更新时间:2023-11-04 03:53:57 30 4
gpt4 key购买 nike

已在 Linux Mint 17 上成功备份我的诺基亚 C2-01

gammu backup my_backup_file

我惊恐地发现我无法恢复该文件。正在做

gammu restore my_backup_file

结果:

*** buffer overflow detected ***: gammu terminated
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f2b8935408c]
/lib/x86_64-linux-gnu/libc.so.6(+0x111020)[0x7f2b89353020]
/usr/lib/libGammu.so.7(LoadBackup+0x1e4)[0x7f2b89af7584]
gammu(ReadBackup+0x22)[0x42d552]
gammu(Restore+0x44)[0x42d784]
gammu(ProcessParameters+0x201)[0x42a261]
gammu(main+0x641)[0x40aa81]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f2b89263de5]
gammu[0x40ab35]

This page看起来非常相关,但如何修复我的备份文件以便它能够成功恢复?

最佳答案

来自this mailing list post :

The reason is that the Creator field in the original backup file has 84 characters...[b]ut GSM_Backup struct defines field for that string as: char Creator[80];

令人难以置信的低技术解决方案是对备份文件进行文本编辑并缩短Creator字段:

Gammu 1.30.0, Linux, kernel 2.6.34.10-0.6-default (#1 SMP 2011-12-13 18:27:38 +0100

确保它少于 80 个字符。然后备份恢复就完美了!

关于python - gammu 恢复期间检测到缓冲区溢出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25416290/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com