* Re: [devel] mtools-4.0.10-alt1: Sisyphus/i586 test rebuild failed
@ 2009-07-20 10:05 ` Michael Shigorin
2009-07-20 10:58 ` Michael Shigorin
0 siblings, 1 reply; 4+ messages in thread
From: Michael Shigorin @ 2009-07-20 10:05 UTC (permalink / raw)
To: devel
On Mon, Jul 20, 2009 at 01:56:59PM +0400, QA Team Robot wrote:
> Package: mtools-4.0.10-alt1
> Status: Sisyphus/i586 test rebuild failed
Приму помощь в исправлении mtools (берусь отнести патч апстриму),
иначе пакет естественным образом останется без майнтейнера.
> In file included from /usr/include/string.h:658,
> from sysincludes.h:264,
> from mlabel.c:22:
> In function 'strcpy',
> inlined from 'label_name' at mlabel.c:38:
> /usr/include/bits/string3.h:106: error: call to __builtin___strcpy_chk will always overflow destination buffer
> make: Leaving directory `/usr/src/RPM/BUILD/mtools-4.0.10'
> make: *** [mlabel.o] Error 1
--
---- WBR, Michael Shigorin <mike@altlinux.ru>
------ Linux.Kiev http://www.linux.kiev.ua/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [devel] mtools-4.0.10-alt1: Sisyphus/i586 test rebuild failed
2009-07-20 10:05 ` [devel] mtools-4.0.10-alt1: Sisyphus/i586 test rebuild failed Michael Shigorin
@ 2009-07-20 10:58 ` Michael Shigorin
2009-07-20 11:42 ` Sergey Vlasov
0 siblings, 1 reply; 4+ messages in thread
From: Michael Shigorin @ 2009-07-20 10:58 UTC (permalink / raw)
To: devel
[-- Attachment #1: Type: text/plain, Size: 978 bytes --]
On Mon, Jul 20, 2009 at 01:05:03PM +0300, I wrote:
> On Mon, Jul 20, 2009 at 01:56:59PM +0400, QA Team Robot wrote:
> > Package: mtools-4.0.10-alt1
> > Status: Sisyphus/i586 test rebuild failed
> Приму помощь в исправлении mtools (берусь отнести патч апстриму),
> иначе пакет естественным образом останется без майнтейнера.
Ладно, костыль я туда положил. А теперь объясните мне кто-нить
понимающий, почему исходный патч-то не проконал? Он логичней.
> > In file included from /usr/include/string.h:658,
> > from sysincludes.h:264,
> > from mlabel.c:22:
> > In function 'strcpy',
> > inlined from 'label_name' at mlabel.c:38:
> > /usr/include/bits/string3.h:106: error: call to __builtin___strcpy_chk will always overflow destination buffer
> > make: Leaving directory `/usr/src/RPM/BUILD/mtools-4.0.10'
> > make: *** [mlabel.o] Error 1
>
--
---- WBR, Michael Shigorin <mike@altlinux.ru>
------ Linux.Kiev http://www.linux.kiev.ua/
[-- Attachment #2: mtools-4.0.10-alt-buffer.patch --]
[-- Type: text/plain, Size: 761 bytes --]
diff -Naur mtools-4.0.10-orig/file_name.h mtools-4.0.10/file_name.h
--- mtools-4.0.10-orig/file_name.h 2009-02-19 22:41:14 +0200
+++ mtools-4.0.10/file_name.h 2009-07-20 13:42:26 +0300
@@ -26,8 +26,8 @@
* MYFILE TXT
*/
struct dos_name_t {
- char base[8];
- char ext[3];
+ char base[9];
+ char ext[4];
char sentinel;
};
diff -Naur mtools-4.0.10-orig/mlabel.c mtools-4.0.10/mlabel.c
--- mtools-4.0.10-orig/mlabel.c 2009-03-03 08:10:11 +0200
+++ mtools-4.0.10/mlabel.c 2009-07-20 13:34:02 +0300
@@ -35,7 +35,8 @@
int have_lower, have_upper;
wchar_t wbuffer[12];
- strcpy(ans->base," ");
+ strcpy(ans->base," ");
+ strcpy(ans->ext," ");
len = native_to_wchar(filename, wbuffer, 11, 0, 0);
if(len > 11){
*mangled = 1;
[-- Attachment #3: mtools-4.0.10-alt-buffer.patch.orig --]
[-- Type: text/plain, Size: 426 bytes --]
diff -Naur mtools-4.0.10-orig/mlabel.c mtools-4.0.10/mlabel.c
--- mtools-4.0.10-orig/mlabel.c 2009-03-03 08:10:11 +0200
+++ mtools-4.0.10/mlabel.c 2009-07-20 13:34:02 +0300
@@ -35,7 +35,8 @@
int have_lower, have_upper;
wchar_t wbuffer[12];
- strcpy(ans->base," ");
+ strcpy(ans->base," ");
+ strcpy(ans->ext," ");
len = native_to_wchar(filename, wbuffer, 11, 0, 0);
if(len > 11){
*mangled = 1;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [devel] mtools-4.0.10-alt1: Sisyphus/i586 test rebuild failed
2009-07-20 10:58 ` Michael Shigorin
@ 2009-07-20 11:42 ` Sergey Vlasov
2009-07-20 12:14 ` Michael Shigorin
0 siblings, 1 reply; 4+ messages in thread
From: Sergey Vlasov @ 2009-07-20 11:42 UTC (permalink / raw)
To: devel
[-- Attachment #1: Type: text/plain, Size: 3473 bytes --]
On Mon, Jul 20, 2009 at 01:58:28PM +0300, Michael Shigorin wrote:
> On Mon, Jul 20, 2009 at 01:05:03PM +0300, I wrote:
> > On Mon, Jul 20, 2009 at 01:56:59PM +0400, QA Team Robot wrote:
> > > Package: mtools-4.0.10-alt1
> > > Status: Sisyphus/i586 test rebuild failed
> > Приму помощь в исправлении mtools (берусь отнести патч апстриму),
> > иначе пакет естественным образом останется без майнтейнера.
>
> Ладно, костыль я туда положил. А теперь объясните мне кто-нить
> понимающий, почему исходный патч-то не проконал? Он логичней.
>
> > > In file included from /usr/include/string.h:658,
> > > from sysincludes.h:264,
> > > from mlabel.c:22:
> > > In function 'strcpy',
> > > inlined from 'label_name' at mlabel.c:38:
> > > /usr/include/bits/string3.h:106: error: call to __builtin___strcpy_chk will always overflow destination buffer
> > > make: Leaving directory `/usr/src/RPM/BUILD/mtools-4.0.10'
> > > make: *** [mlabel.o] Error 1
> >
>
> --
> ---- WBR, Michael Shigorin <mike@altlinux.ru>
> ------ Linux.Kiev http://www.linux.kiev.ua/
> diff -Naur mtools-4.0.10-orig/file_name.h mtools-4.0.10/file_name.h
> --- mtools-4.0.10-orig/file_name.h 2009-02-19 22:41:14 +0200
> +++ mtools-4.0.10/file_name.h 2009-07-20 13:42:26 +0300
> @@ -26,8 +26,8 @@
> * MYFILE TXT
> */
> struct dos_name_t {
> - char base[8];
> - char ext[3];
> + char base[9];
> + char ext[4];
Такой "костыль" всё сломает - эта структура должна соответствовать
формату хранения имени файла в файловой системе FAT.
> char sentinel;
> };
>
> diff -Naur mtools-4.0.10-orig/mlabel.c mtools-4.0.10/mlabel.c
> --- mtools-4.0.10-orig/mlabel.c 2009-03-03 08:10:11 +0200
> +++ mtools-4.0.10/mlabel.c 2009-07-20 13:34:02 +0300
> @@ -35,7 +35,8 @@
> int have_lower, have_upper;
> wchar_t wbuffer[12];
>
> - strcpy(ans->base," ");
> + strcpy(ans->base," ");
> + strcpy(ans->ext," ");
> len = native_to_wchar(filename, wbuffer, 11, 0, 0);
> if(len > 11){
> *mangled = 1;
> diff -Naur mtools-4.0.10-orig/mlabel.c mtools-4.0.10/mlabel.c
> --- mtools-4.0.10-orig/mlabel.c 2009-03-03 08:10:11 +0200
> +++ mtools-4.0.10/mlabel.c 2009-07-20 13:34:02 +0300
> @@ -35,7 +35,8 @@
> int have_lower, have_upper;
> wchar_t wbuffer[12];
>
> - strcpy(ans->base," ");
> + strcpy(ans->base," ");
> + strcpy(ans->ext," ");
Завершающий \0 всё равно не лезет в буфер.
Можно попробовать так (для memcpy проверки не выполняются):
--- mtools-4.0.10/mlabel.c.orig 2009-07-20 15:36:44 +0400
+++ mtools-4.0.10/mlabel.c 2009-07-20 15:36:48 +0400
@@ -35,7 +35,7 @@ void label_name(doscp_t *cp, const char
int have_lower, have_upper;
wchar_t wbuffer[12];
- strcpy(ans->base," ");
+ memcpy(ans->base, " ", 12);
len = native_to_wchar(filename, wbuffer, 11, 0, 0);
if(len > 11){
*mangled = 1;
Или более понятным образом:
--- mtools-4.0.10/mlabel.c.orig 2009-07-20 15:36:44 +0400
+++ mtools-4.0.10/mlabel.c 2009-07-20 15:40:28 +0400
@@ -35,7 +35,10 @@ void label_name(doscp_t *cp, const char
int have_lower, have_upper;
wchar_t wbuffer[12];
- strcpy(ans->base," ");
+ memset(ans->base, ' ', sizeof ans->base);
+ memset(ans->ext, ' ', sizeof ans->ext);
+ ans->sentinel = '\0';
+
len = native_to_wchar(filename, wbuffer, 11, 0, 0);
if(len > 11){
*mangled = 1;
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [devel] mtools-4.0.10-alt1: Sisyphus/i586 test rebuild failed
2009-07-20 11:42 ` Sergey Vlasov
@ 2009-07-20 12:14 ` Michael Shigorin
0 siblings, 0 replies; 4+ messages in thread
From: Michael Shigorin @ 2009-07-20 12:14 UTC (permalink / raw)
To: devel
On Mon, Jul 20, 2009 at 03:42:11PM +0400, Sergey Vlasov wrote:
> > struct dos_name_t {
> > - char base[8];
> > - char ext[3];
> > + char base[9];
> > + char ext[4];
> Такой "костыль" всё сломает - эта структура должна соответствовать
> формату хранения имени файла в файловой системе FAT.
Вот и мне показалось, что сейчас всё сломаю, но не удосужился
поискать тестовый образ дискетки. :-/ Спасибо!
> > - strcpy(ans->base," ");
> > + strcpy(ans->base," ");
> > + strcpy(ans->ext," ");
> Завершающий \0 всё равно не лезет в буфер.
> Можно попробовать так (для memcpy проверки не выполняются):
[...]
> Или более понятным образом:
Взял второй вариант, сборка отправлена в incoming, иду общать
апстрим; спасибо.
--
---- WBR, Michael Shigorin <mike@altlinux.ru>
------ Linux.Kiev http://www.linux.kiev.ua/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-20 12:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-20 10:05 ` [devel] mtools-4.0.10-alt1: Sisyphus/i586 test rebuild failed Michael Shigorin
2009-07-20 10:58 ` Michael Shigorin
2009-07-20 11:42 ` Sergey Vlasov
2009-07-20 12:14 ` Michael Shigorin
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git