Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
4cd1c4cb
Kaydet (Commit)
4cd1c4cb
authored
Ock 13, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
external/hunspell: Work around -fsanitize=shift
Change-Id: I66ac6ec25615698382d065db2b782950cbc154e4
üst
28136322
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
ubsan.patch.0
external/hunspell/ubsan.patch.0
+24
-0
No files found.
external/hunspell/ubsan.patch.0
Dosyayı görüntüle @
4cd1c4cb
...
@@ -9,3 +9,27 @@
...
@@ -9,3 +9,27 @@
for (int i=0; i < 4 && *word != 0; i++)
for (int i=0; i < 4 && *word != 0; i++)
hv = (hv << 8) | (*word++);
hv = (hv << 8) | (*word++);
while (*word != 0) {
while (*word != 0) {
--- src/hunspell/csutil.cxx
+++ src/hunspell/csutil.cxx
@@ -147,7 +147,7 @@
case 0xd0: { // 2-byte UTF-8 codes
if ((*(u8+1) & 0xc0) == 0x80) {
u2->h = (*u8 & 0x1f) >> 2;
- u2->l = (*u8 << 6) + (*(u8+1) & 0x3f);
+ u2->l = (*reinterpret_cast<unsigned char const *>(u8) << 6) + (*(u8+1) & 0x3f);
u8++;
} else {
HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - (signed char *)src), src);
@@ -158,10 +158,10 @@
}
case 0xe0: { // 3-byte UTF-8 codes
if ((*(u8+1) & 0xc0) == 0x80) {
- u2->h = ((*u8 & 0x0f) << 4) + ((*(u8+1) & 0x3f) >> 2);
+ u2->h = ((*reinterpret_cast<unsigned char const *>(u8) & 0x0f) << 4) + ((*(u8+1) & 0x3f) >> 2);
u8++;
if ((*(u8+1) & 0xc0) == 0x80) {
- u2->l = (*u8 << 6) + (*(u8+1) & 0x3f);
+ u2->l = (*reinterpret_cast<unsigned char const *>(u8) << 6) + (*(u8+1) & 0x3f);
u8++;
} else {
HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - (signed char *)src), src);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment