gparted/include
Mike Fleetwood 8dbbb47ce2 Workaround g_utf8_get_char_validate() bug with embedded NUL bytes (#777973)
If PipeCapture reads a NUL byte in the middle of what is expected to be
a multi-byte UTF-8 character then PipeCapture either returns the
captured characters to the previous update or loops forever depending on
whether the end of the stream is encountered before the read buffer is
full or not.  This is equivalent to saying whether the NUL byte occurs
within the last 512 bytes of the output or not.

This is caused by a bug in g_utf8_get_char_validated() reporting that a
partial UTF-8 character has been found when the NUL byte is encountered
in the middle of a multi-byte character even though more bytes are
available in the length specified buffer.  g_utf8_get_char_validated()
is always stopping at the NUL byte assuming it is working with a NUL
terminated string.

Workaround this by checking for g_utf8_get_char_validated() claiming a
partial UTF-8 character has been found when in fact there are at least
enough bytes in the read buffer to instead determine that it is really
an invalid UTF-8 character.

Reference:
    Bug 780095 - g_utf8_get_char_validated() stopping at nul byte even
                 for length specified buffers
    https://bugzilla.gnome.org/show_bug.cgi?id=780095

Bug 777973 - Segmentation fault on bad disk
2017-06-02 11:47:35 -06:00
..
BlockSpecial.h Pre-populate BlockSpecial cache while reading /proc/partitions (#767842) 2016-08-06 09:47:58 -06:00
CopyBlocks.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
DMRaid.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Device.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
DialogFeatures.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
DialogManageFlags.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Base_Partition.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Disklabel.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_FileSystem_Label.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Partition_Copy.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Partition_Info.h Provide virtual Partition::get_filesystem_partition() method (#774818) 2017-01-14 08:49:58 -07:00
Dialog_Partition_Name.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Partition_New.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Partition_Resize_Move.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Progress.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Dialog_Rescue_Data.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
DrawingAreaVisualDisk.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
FS_Info.h Ensure blkid FS_Info cache has entries for all whole disk devices (#771244) 2017-01-06 12:21:50 -07:00
FileSystem.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
Frame_Resizer_Base.h Replace obsolete FSF postal address in copyright notices (#721565) 2014-01-26 10:53:23 +00:00
Frame_Resizer_Extended.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
GParted_Core.h Implement maximize encryption volume as part of check repair operation (#774818) 2017-01-14 08:49:58 -07:00
HBoxOperations.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
LUKS_Info.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
LVM2_PV_Info.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Makefile.am Rename file and class to CopyBlocks (#775932) 2016-12-12 13:15:34 -07:00
Mount_Info.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Operation.h Create and use general find_extended_partition() function 2017-01-14 08:49:58 -07:00
OperationChangeUUID.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationCheck.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationCopy.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationCreate.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationDelete.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationDetail.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationFormat.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationLabelFileSystem.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationNamePartition.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
OperationResizeMove.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Partition.h Remove unused clear_mountpoints parameter from add_mountpoint*() 2017-01-14 08:49:58 -07:00
PartitionLUKS.h Preview resize/move operation of encrypted file systems (#774818) 2017-01-14 08:49:58 -07:00
PartitionVector.h Create and use general find_extended_partition() function 2017-01-14 08:49:58 -07:00
PipeCapture.h Workaround g_utf8_get_char_validate() bug with embedded NUL bytes (#777973) 2017-06-02 11:47:35 -06:00
Proc_Partitions_Info.h Switch to a static interface for Proc_Partitions_Info 2016-08-06 09:47:58 -06:00
ProgressBar.h Write a generic progress bar class (#760709) 2016-02-12 09:09:56 -07:00
SWRaid_Info.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
TreeView_Detail.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
Utils.h Extend functions generating encrypted file system string (#774818) 2017-01-14 08:49:58 -07:00
Win_GParted.h Fix snap-to-alignment of operations creating partitions (#779339) 2017-04-23 08:57:25 -06:00
btrfs.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
exfat.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
ext2.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
f2fs.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
fat16.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
hfs.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
hfsplus.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
i18n.h Make include guards unique (#539297) 2013-06-05 10:57:39 -06:00
jfs.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
linux_swap.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
luks.h Implement resize/move operation of encrypted file systems (#774818) 2017-01-14 08:49:58 -07:00
lvm2_pv.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
nilfs2.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
ntfs.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
reiser4.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
reiserfs.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00
ufs.h Remove "../include/" from GParted header #includes 2016-12-12 13:15:34 -07:00
xfs.h Stop providing a default for FileSystem::resize() fill_partition argument 2016-12-12 13:15:34 -07:00