[openbox] Feh Borderless - Anyone Achieved This In Openbox?

Jim Rees rees at umich.edu
Sun Jul 28 16:23:19 EDT 2013


Brian Mattern wrote:

  On Sun, 28 Jul 2013, Jim Rees wrote:
  
  > Brian Mattern wrote:
  >   
  >   The correct fix is attached. On 64-bit machines, X apparently means
  >   "long" when it says "32", and NOT 32 bits. So, it actually expects 40
  >   bytes of data to be passed.
  > 
  > That doesn't make sense. Openbox has its own definition of mwmhints, and the
  > elements are declared as guint, which is an unsigned int. I wonder if
  > openbox is doing the right thing.
  
  The manpage for XChangeProperty states:
  
    If the specified format is 8, the property data must be a char array.
    If the specified format is 16, the property data must be a short array.
    If the specified format is 32, the property data must be a long array.
  
  It may be unintuitive and perhaps a bit silly, but it is what it is.
  
  You can also look at get_all() in openbox/obt/prop.c, which casts the
  data to gulong and then copies the value into a guint32.
  (get_all() gets called by OBT_PROP_GETA32() in client_get_mwm_hints() in
  openbox/openbox/client.c)

Ah, that makes sense. A bit silly as you say. Thanks.

  > 
  > Also I'd be much happier if you left the memset in.
  
  The code is correct either way, so I'm ambivalent. But, I'll add it in
  for good form.

The issue is that it leaks info from whatever is on the stack. Probably not
a big deal in this case, but the kind of thing that leads to security
problems.


More information about the openbox mailing list