---
name: "xdr_restrict_buflen"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/xdr_restrict_buflen"
---

# xdr\_restrict\_buflen(9)

decrease available buffer space

## NAME

xdr\_restrict\_buflen - decrease available buffer space

## SYNOPSIS

**int xdr\_restrict\_buflen(struct xdr\_stream \*** *xdr***, int** *newbuflen***);**

## ARGUMENTS

*xdr*

pointer to xdr\_stream

*newbuflen*

new maximum number of bytes available

## DESCRIPTION

Adjust our idea of how much space is available in the buffer. If we've already used too much space in the buffer, returns -1. If the available space is already smaller than newbuflen, returns 0 and does nothing. Otherwise, adjusts xdr-\>buf-\>buflen to newbuflen and ensures xdr-\>end is set at most offset newbuflen from the start of the buffer.

## COPYRIGHT
