Discussion:
[bug-mailutils] Mimeview is unable to parse mime.types file
Pierre-Jean
2017-05-30 11:29:23 UTC
Permalink
Hello alls,

Mimeview is unable to parse my current mime.types file:
mimeview -t /usr/share/cups/mime/mime.types file
Invalid character '^', state 1
Aborted (core dump)

Mimeview seems to be unable to parse the regex rule of the
file mime.types. Apparently, that regex rule was introduced
for the sole pdf detection, and is not documented in man 5
mime.types. I found the commit which adds that rule on the
cups repository:
https://github.com/apple/cups/commit/6ee54c072996fd4cde3d5a53e80918e90f8e29c5

But, even with that rule commented, mimeview is still unable
to parse the file:
mimeview -t /usr/share/cups/mime/mime.types file
mimeview: /usr/share/cups/mime/mime.types:86: syntax error
mimeview: /usr/share/cups/mime/mime.types:94: syntax error
mimeview: /usr/share/cups/mime/mime.types:125: syntax error
mimeview: /usr/share/cups/mime/mime.types:148: syntax error
mimeview: /usr/share/cups/mime/mime.types:156: syntax error
mimeview: /usr/share/cups/mime/mime.types:177: syntax error


Cups 2.2.3
mailutils (GNU Mailutils) 3.2.91-15 [release-3.2-40-gd2952d1c8-dirty]
my /usr/share/cups/mime/mime.types is joined.

Kind regards,
Pierre-Jean.
Sergey Poznyakoff
2017-05-31 09:19:41 UTC
Permalink
Hi Pierre-Jean,
Thanks for reporting. I've pushed commit a79ec559. Please
pull. Note that among other changes, it renames the -t option
to -f for consistency with other tools. The -t option is reused
as a short equivalent of the new --lint option. Take a look at
the commit message for more info. I'm working on a testsuite for
mimeview, which I'll push soon.

Regards,
Sergey
Pierre-Jean
2017-05-31 12:09:51 UTC
Permalink
Hello Sergey,
I've pushed commit a79ec559. Please pull.
I did, and thanks to the new -t option, I found a typo in my
mime.types file, and posted a bug on cups' mailing list.
But apparently, there's a problem:

$ mimeview -f mime.types file
*** stack smashing detected ***: mimeview terminated
======= Backtrace: =========
/usr/lib/libc.so.6(+0x6a13a)[0xb746913a]
/usr/lib/libc.so.6(__fortify_fail+0x37)[0xb74fd1f7]
/usr/lib/libc.so.6(+0xfe1b8)[0xb74fd1b8]
mimeview[0x804bd87]
mimeview[0x804bf99]
mimeview[0x804bffd]
mimeview[0x804c033]
/usr/lib/libmailutils.so.5(+0x4fd2e)[0xb7674d2e]
/usr/lib/libmailutils.so.5(mu_list_gmap+0x95)[0xb76741a5]
/usr/lib/libmailutils.so.5(mu_list_map+0x64)[0xb7674e04]
mimeview[0x804c094]
mimeview[0x80498df]
/usr/lib/libc.so.6(__libc_start_main+0xf6)[0xb7417366]
mimeview[0x8049a35]
======= Memory map: ========
... etc ...
Abandon (core dumped)

Tell me if I should send you more informations,
Kind regards,
Pierre-Jean.
Sergey Poznyakoff
2017-06-01 19:04:10 UTC
Permalink
Hi Pierre-Jean,
There was indeed. Please pull.

Regards,
Sergey
Pierre-Jean
2017-06-02 06:59:57 UTC
Permalink
Hello Sergey,
Post by Sergey Poznyakoff
There was indeed. Please pull.
It works now. Thank you.

Pierre-Jean.
Pierre-Jean
2017-06-02 07:02:50 UTC
Permalink
Hello Sergey,
Post by Sergey Poznyakoff
There was indeed. Please pull.
It works now. Thank you.

Pierre-Jean.

Loading...