Philip Withnall 01cdce7573 glocalfileinfo: Increase size of the content-type sniff buffer to 16KiB
It was previously 4KiB, but this isn’t enough for sniffing the
content-type of some GPT disk images (they use 4KiB sectors, and the
magic bytes are in the second sector). A buffer of 8KiB would work,
but 16KiB seems harmless and more future proof.

Most of the time, the buffer size should be set by xdgmime anyway, based
on the largest sniff buffer its database needs. Currently (with
shared-mime-info master) that’s 18730 bytes, so even with a 16KiB buffer
we’re going to potentially mis-identify a few file types.

Tested manually by modifying the example GPT image from shared-mime-info
(https://gitlab.freedesktop.org/xdg/shared-mime-info/-/blob/master/tests/mime-detection/disk.gpt)
to remove the magic at offset 0x200 and add it instead at offset 0x1000,
then running:
```
cp shared-mime-info.git/tests/mime-detection/disk.gpt ./disk-without-extension
gio info -a standard::content-type ./disk-without-extension
```

It should print `application/vnd.efi.img` rather than
`application/octet-stream`.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3186
2023-11-27 13:22:21 +00:00
..
2023-11-21 14:55:29 +00:00
2023-10-23 11:26:53 +01:00
2022-10-13 20:53:56 -04:00
2023-10-23 11:26:53 +01:00
2023-10-23 11:26:53 +01:00
2023-10-17 10:57:01 +01:00
2023-10-23 11:26:53 +01:00
2023-10-23 11:26:53 +01:00
2023-10-17 11:19:44 +01:00
2023-10-17 11:19:44 +01:00
2023-10-23 11:26:53 +01:00
2022-10-13 20:53:56 -04:00
2023-10-17 11:19:52 +01:00
2023-10-17 11:19:52 +01:00
2023-10-23 11:26:53 +01:00
2022-10-13 20:53:56 -04:00
2023-10-23 11:26:53 +01:00
2023-10-23 11:26:53 +01:00
2023-10-23 11:26:53 +01:00
2023-10-23 11:26:53 +01:00
2022-10-13 20:53:56 -04:00
2023-10-23 11:26:53 +01:00
2022-10-13 20:53:56 -04:00
2023-11-14 14:32:19 +00:00
2022-10-13 20:53:56 -04:00
2023-10-23 11:26:53 +01:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-11-14 14:32:19 +00:00
2023-11-14 14:32:19 +00:00
2022-10-13 20:53:56 -04:00
2023-11-14 14:32:19 +00:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-10-23 13:43:27 +01:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-10-23 13:43:27 +01:00
2023-10-23 13:43:27 +01:00
2023-11-14 14:32:19 +00:00
2023-11-14 14:32:19 +00:00
2022-10-13 20:53:56 -04:00
2023-10-23 13:43:27 +01:00
2023-10-23 13:43:27 +01:00
2023-11-14 14:32:19 +00:00
2023-10-23 13:18:13 +01:00
2023-10-23 13:18:13 +01:00
2023-10-23 13:18:13 +01:00
2022-10-13 20:53:56 -04:00
2023-10-23 13:18:13 +01:00
2023-10-23 13:18:13 +01:00
2022-05-18 14:01:43 +00:00
2023-11-14 14:32:19 +00:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-10-23 13:18:13 +01:00
2023-10-23 13:18:13 +01:00
2023-10-23 14:45:51 +01:00
2022-10-13 20:53:56 -04:00
2023-10-23 14:45:51 +01:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-10-23 14:45:51 +01:00
2022-10-13 20:53:56 -04:00
2023-10-23 13:43:27 +01:00
2022-10-13 20:53:56 -04:00
2023-10-23 13:43:27 +01:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-10-25 15:10:16 +01:00
2023-10-25 15:10:16 +01:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-10-25 15:10:16 +01:00
2023-10-25 15:10:16 +01:00
2023-08-17 14:25:53 +01:00
2022-10-13 20:53:56 -04:00
2023-08-01 15:33:21 -03:00
2023-10-24 10:58:56 +01:00
2023-10-24 10:58:56 +01:00
2023-11-02 16:30:23 +00:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-11-06 15:14:02 +03:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-10-25 15:10:16 +01:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-11-14 15:17:22 +00:00
2022-10-13 20:53:56 -04:00
2023-10-25 15:10:16 +01:00
2022-10-13 20:53:56 -04:00
2023-11-02 16:30:23 +00:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2022-10-13 20:53:56 -04:00
2023-11-14 15:12:53 +00:00
2023-11-14 15:12:53 +00:00
2023-11-02 16:30:23 +00:00
2023-11-02 16:30:23 +00:00
2022-10-13 20:53:56 -04:00