From: Richard Russon Date: Sat, 11 Aug 2018 22:50:56 +0000 (+0100) Subject: drop integer overflow X-Git-Tag: 2019-10-25~705^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=92990042b3ca62195c1168c7bfe422e37f362466;p=neomutt drop integer overflow --- diff --git a/imap/message.c b/imap/message.c index 3cc199171..fa48ce9b4 100644 --- a/imap/message.c +++ b/imap/message.c @@ -473,7 +473,7 @@ static void alloc_msn_index(struct ImapData *idata, size_t msn_count) * if msn_count is this big, we have a serious problem. */ if (msn_count >= (UINT_MAX / sizeof(struct Header *))) { - mutt_error(_("Integer overflow -- can't allocate memory")); + mutt_error(_("Out of memory")); mutt_exit(1); } diff --git a/mutt/memory.c b/mutt/memory.c index e2a32478e..3821263a7 100644 --- a/mutt/memory.c +++ b/mutt/memory.c @@ -57,7 +57,7 @@ void *mutt_mem_calloc(size_t nmemb, size_t size) if (nmemb > (SIZE_MAX / size)) { - mutt_error(_("Integer overflow -- can't allocate memory")); + mutt_error(_("Out of memory")); mutt_exit(1); } diff --git a/mx.c b/mx.c index 7abf7b310..91b29df34 100644 --- a/mx.c +++ b/mx.c @@ -1337,7 +1337,7 @@ void mx_alloc_memory(struct Context *ctx) if ((ctx->hdrmax + 25) * s < ctx->hdrmax * s) { - mutt_error(_("Integer overflow -- can't allocate memory")); + mutt_error(_("Out of memory")); mutt_exit(1); } diff --git a/po/bg.po b/po/bg.po index 015abd5a3..5f2e0bb2f 100644 --- a/po/bg.po +++ b/po/bg.po @@ -3040,11 +3040,6 @@ msgstr "Debugging на ниво %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Debugging на ниво %d.\n" -#: mutt/memory.c:60 -#, fuzzy -msgid "Integer overflow -- can't allocate memory" -msgstr "Integer overflow -- заделянето на памет е невъзможно" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Недостатъчно памет" diff --git a/po/ca.po b/po/ca.po index 42b7ede92..4df10cb3a 100644 --- a/po/ca.po +++ b/po/ca.po @@ -3109,10 +3109,6 @@ msgstr "S’activa la depuració a nivell %d.\n" msgid "Logging at level %d to file '%s'" msgstr "S’activa la depuració a nivell %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Desbordament enter, no s’ha pogut reservar memòria." - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "No resta memòria." diff --git a/po/cs.po b/po/cs.po index 1f3fb7f33..d77767aab 100644 --- a/po/cs.po +++ b/po/cs.po @@ -2982,10 +2982,6 @@ msgstr "Úroveň ladění je %d do souboru „%s“" msgid "Logging at level %d to file '%s'" msgstr "Úroveň ladění je %d do souboru „%s“" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Přetečení celočíselné proměnné - nelze alokovat paměť" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Paměť vyčerpána" diff --git a/po/da.po b/po/da.po index ca6d5f492..3bdbdc71d 100644 --- a/po/da.po +++ b/po/da.po @@ -2961,10 +2961,6 @@ msgstr "Fejlfinder på niveau %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Fejlfinder på niveau %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Heltals-overløb, kan ikke tildele hukommelse" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Ikke mere hukommelse" diff --git a/po/de.po b/po/de.po index faa800a88..ee1b42086 100644 --- a/po/de.po +++ b/po/de.po @@ -2960,10 +2960,6 @@ msgstr "Schreibe Fehlersuche der Stufe %d nach Datei '%s'" msgid "Logging at level %d to file '%s'" msgstr "Schreibe Protokoll der Stufe %d nach Datei '%s'" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Integer Überlauf -- Kann keinen Speicher belegen" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Kein Speicher verfügbar" diff --git a/po/el.po b/po/el.po index 13bed249a..a17961d38 100644 --- a/po/el.po +++ b/po/el.po @@ -3041,10 +3041,6 @@ msgstr "Αποσφαλμάτωση στο επίπεδο %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Αποσφαλμάτωση στο επίπεδο %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Υπερχείλιση ακεραίου -- αδυναμία εκχώρησης μνήμης" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Η μνήμη εξαντλήθηκε" diff --git a/po/en_GB.po b/po/en_GB.po index 3c3250df5..78768647a 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -2951,10 +2951,6 @@ msgstr "Debugging at level %d to file '%s'" msgid "Logging at level %d to file '%s'" msgstr "Logging at level %d to file '%s'" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Integer overflow -- can't allocate memory" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Out of memory" diff --git a/po/eo.po b/po/eo.po index 296ec0f21..5530dd094 100644 --- a/po/eo.po +++ b/po/eo.po @@ -2960,10 +2960,6 @@ msgstr "Sencimigo ĉe la nivelo %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Sencimigo ĉe la nivelo %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Entjera troo -- ne eblas asigni memoron" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Mankas sufiĉa memoro" diff --git a/po/es.po b/po/es.po index f196358a2..5f5efacf4 100644 --- a/po/es.po +++ b/po/es.po @@ -3043,10 +3043,6 @@ msgstr "Modo debug a nivel %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Modo debug a nivel %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Desbordamiento de número entero -- ¡No se puede asignar memoria" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "¡Sin memoria" diff --git a/po/et.po b/po/et.po index 58ceaf5b5..2ba6782b7 100644 --- a/po/et.po +++ b/po/et.po @@ -3036,10 +3036,6 @@ msgstr "Silumise tase %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Silumise tase %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Mälu on otsas" diff --git a/po/eu.po b/po/eu.po index c687cac6a..b25d63032 100644 --- a/po/eu.po +++ b/po/eu.po @@ -2995,10 +2995,6 @@ msgstr "%d. mailan arazten.\n" msgid "Logging at level %d to file '%s'" msgstr "%d. mailan arazten.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Osoko zenbakia iraultzea - ezin da memoria esleitu" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Memoriaz kanpo" diff --git a/po/fr.po b/po/fr.po index 95a93d0d0..3b3002431 100644 --- a/po/fr.po +++ b/po/fr.po @@ -3098,10 +3098,6 @@ msgstr "Débuggage au niveau %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Débuggage au niveau %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Dépassement de capacité sur entier -- impossible d'allouer la mémoire " - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Plus de mémoire " diff --git a/po/ga.po b/po/ga.po index 4c31507ee..2072cbf7f 100644 --- a/po/ga.po +++ b/po/ga.po @@ -3046,10 +3046,6 @@ msgstr "Leibhéal dífhabhtaithe = %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Leibhéal dífhabhtaithe = %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Slánuimhir thar maoil -- ní féidir cuimhne a dháileadh" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Cuimhne ídithe" diff --git a/po/gl.po b/po/gl.po index ca209b5c3..d249ecbc1 100644 --- a/po/gl.po +++ b/po/gl.po @@ -3054,10 +3054,6 @@ msgstr "Depurando a nivel %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Depurando a nivel %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "¡Memoria agotada" diff --git a/po/hu.po b/po/hu.po index 536392a6c..2ffc29411 100644 --- a/po/hu.po +++ b/po/hu.po @@ -3037,10 +3037,6 @@ msgstr "Hibakövetés szintje: %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Hibakövetés szintje: %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Elfogyott a memória" diff --git a/po/id.po b/po/id.po index 7ef2c9be6..70505f572 100644 --- a/po/id.po +++ b/po/id.po @@ -2982,10 +2982,6 @@ msgstr "Melakukan debug tingkat %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Melakukan debug tingkat %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Integer overflow -- tidak bisa mengalokasikan memori" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Buset, memory abis" diff --git a/po/it.po b/po/it.po index 2ac49ea47..ba25f9c01 100644 --- a/po/it.po +++ b/po/it.po @@ -2987,10 +2987,6 @@ msgstr "Debugging al livello %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Debugging al livello %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Overflow intero.-- impossibile allocare memoria" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Memoria esaurita" diff --git a/po/ja.po b/po/ja.po index 52538b69e..0bf38ca33 100644 --- a/po/ja.po +++ b/po/ja.po @@ -2954,10 +2954,6 @@ msgstr "レベル %d でデバッグ中。\n" msgid "Logging at level %d to file '%s'" msgstr "レベル %d でデバッグ中。\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "桁あふれ -- メモリを割り当てられない" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "メモリ不足" diff --git a/po/ko.po b/po/ko.po index b749a7b37..aca53b6c9 100644 --- a/po/ko.po +++ b/po/ko.po @@ -3019,10 +3019,6 @@ msgstr "디버깅 레벨 %d.\n" msgid "Logging at level %d to file '%s'" msgstr "디버깅 레벨 %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Integer overflow -- 메모리 할당 불가" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "메모리 부족" diff --git a/po/lt.po b/po/lt.po index 297f5403f..6e4d4ee5c 100644 --- a/po/lt.po +++ b/po/lt.po @@ -2971,10 +2971,6 @@ msgstr "Derinimo lygis %d į bylą '%s'" msgid "Logging at level %d to file '%s'" msgstr "Žurnalo lygis %d į bylą '%s'" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Sveikųjų skaičių perpildymas - negaliu išskirti atminties" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Baigėsi atmintis" diff --git a/po/nl.po b/po/nl.po index ba8fbfc2f..8ff77c64d 100644 --- a/po/nl.po +++ b/po/nl.po @@ -2965,10 +2965,6 @@ msgstr "Debug-informatie op niveau %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Debug-informatie op niveau %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Integer overflow -- kan geen geheugen alloceren" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Onvoldoende geheugen" diff --git a/po/pl.po b/po/pl.po index 6d56fd239..026278367 100644 --- a/po/pl.po +++ b/po/pl.po @@ -2946,10 +2946,6 @@ msgstr "Diagnostyka błędów na poziomie %d do pliku '%s'" msgid "Logging at level %d to file '%s'" msgstr "Zapisywanie logu na poziomie %d do pliku '%s'" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Przepełnienie zmiennej całkowitej - nie można zaalokować pamięci" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Brak pamięci" diff --git a/po/pt_BR.po b/po/pt_BR.po index 5d94cc887..50209aa0f 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -2950,10 +2950,6 @@ msgstr "Depurando no nível %d para o arquivo '%s'" msgid "Logging at level %d to file '%s'" msgstr "Realizando log no nível %d para o arquivo '%s'" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Transbordo (overflow) de inteiros -- incapaz de alocar memória" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Acabou a memória" diff --git a/po/ru.po b/po/ru.po index dae10e0f8..f9b0b6a8d 100644 --- a/po/ru.po +++ b/po/ru.po @@ -2979,10 +2979,6 @@ msgstr "Отладка на уровне %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Отладка на уровне %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Переполнение -- не удалось выделить память" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Нехватка памяти" diff --git a/po/sk.po b/po/sk.po index 47f8b1f20..d0aa72a6e 100644 --- a/po/sk.po +++ b/po/sk.po @@ -3010,10 +3010,6 @@ msgstr "Ladenie na úrovni %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Ladenie na úrovni %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Nedostatok pamäte" diff --git a/po/sv.po b/po/sv.po index 03070c5a2..57f6ad3b5 100644 --- a/po/sv.po +++ b/po/sv.po @@ -2994,10 +2994,6 @@ msgstr "Avlusning på nivå %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Avlusning på nivå %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Heltalsöverflödning -- kan inte allokera minne" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Slut på minne" diff --git a/po/tr.po b/po/tr.po index 476fb0d49..c3619426c 100644 --- a/po/tr.po +++ b/po/tr.po @@ -2967,10 +2967,6 @@ msgstr "Hata ayıklama bilgileri için %d seviyesi kullanılıyor.\n" msgid "Logging at level %d to file '%s'" msgstr "Hata ayıklama bilgileri için %d seviyesi kullanılıyor.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Tam sayı taşması -- bellek ayrılamıyor" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Bellek tükendi" diff --git a/po/uk.po b/po/uk.po index 9ebac6b9e..9c0403c2c 100644 --- a/po/uk.po +++ b/po/uk.po @@ -2974,10 +2974,6 @@ msgstr "Відлагодження з рівнем %d.\n" msgid "Logging at level %d to file '%s'" msgstr "Відлагодження з рівнем %d.\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "Переповнення цілого значення -- неможливо виділити пам’ять" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "Не вистачає пам’яті" diff --git a/po/zh_CN.po b/po/zh_CN.po index 66a5cf7b4..d8a90c529 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -2942,10 +2942,6 @@ msgstr "正在使用级别 %d 进行调试,输出到文件 '%s'" msgid "Logging at level %d to file '%s'" msgstr "正在使用级别 %d 记录日志到文件 '%s'" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "整数溢出 -- 无法分配内存" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "内存不足" diff --git a/po/zh_TW.po b/po/zh_TW.po index 0b5769366..218fbb6b3 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -3032,10 +3032,6 @@ msgstr "除錯模式在第 %d 層。\n" msgid "Logging at level %d to file '%s'" msgstr "除錯模式在第 %d 層。\n" -#: mutt/memory.c:60 -msgid "Integer overflow -- can't allocate memory" -msgstr "" - #: mutt/memory.c:67 mutt/memory.c:108 mutt/memory.c:142 safe_asprintf.c:61 msgid "Out of memory" msgstr "記憶體不足"