Re: git column fails (or crashes) if padding is negative

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I wasn’t able to reproduce quite what you got but kind of the same.

```
$ seq 1 24 | git column --mode=column --padding=-1
12345678910<binary?><numbers>
$ seq 1 24 | git column --mode=column --padding=-3
fatal: Data too large to fit into virtual memory space.
$ seq 1 24 | git column --mode=column --padding=-5
fatal: Out of memory, malloc failed (tried to allocate 18446744073709551614 bytes)
```

This is an “Internal helper command” under the “plumbing” suite. And I
get the impression that sometimes these fallthroughs are treated as
“don’t do that”. But I don’t know.

On the other hand it failing inside malloc looks weird. Why not catch
this before the malloc call is made?

[System Info]
git version:
git version 2.43.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 6.5.0-17-generic #17~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 16 14:32:32 UTC 2 x86_64
compiler info: gnuc: 11.4
libc info: glibc: 2.35
$SHELL (typically, interactive shell): /bin/bash


[Enabled Hooks]


-- 
Kristoffer Haugsbakk





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux