Code Monkey home page Code Monkey logo

mscfb's People

Contributors

mistydemeo avatar richardlehane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mscfb's Issues

panic on govdocs file

A file in the govdocs corpus triggers a traversal bug that blows the stack. Reported by @euanc

runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow

runtime stack:
runtime.throw(0x84c044, 0xe)
	/home/travis/.gimme/versions/go1.12.9.linux.amd64/src/runtime/panic.go:617 +0x72
runtime.newstack()
	/home/travis/.gimme/versions/go1.12.9.linux.amd64/src/runtime/stack.go:1041 +0x6f0
runtime.morestack()
	/home/travis/.gimme/versions/go1.12.9.linux.amd64/src/runtime/asm_amd64.s:429 +0x8f

goroutine 10 [running]:
github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb.(*Reader).traverse.func1(0x0, 0xbdbcf8, 0x0, 0x0)
	/home/travis/gopath/src/github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb/file.go:150 +0x3fb fp=0xc024000390 sp=0xc024000388 pc=0x6dcfdb
github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb.(*Reader).traverse.func1(0x0, 0xbdbcf8, 0x0, 0x0)
	/home/travis/gopath/src/github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb/file.go:157 +0x3d5 fp=0xc024000430 sp=0xc024000390 pc=0x6dcfb5
github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb.(*Reader).traverse.func1(0x0, 0xbdbcf8, 0x0, 0x0)
	/home/travis/gopath/src/github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb/file.go:157 +0x3d5 fp=0xc0240004d0 sp=0xc024000430 pc=0x6dcfb5
github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb.(*Reader).traverse.func1(0x0, 0xbdbcf8, 0x0, 0x0)
	/home/travis/gopath/src/github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb/file.go:157 +0x3d5 fp=0xc024000570 sp=0xc0240004d0 pc=0x6dcfb5
github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb.(*Reader).traverse.func1(0x0, 0xbdbcf8, 0x0, 0x0)
	/home/travis/gopath/src/github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb/file.go:157 +0x3d5 fp=0xc024000610 sp=0xc024000570 pc=0x6dcfb5
github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb.(*Reader).traverse.func1(0x0, 0xbdbcf8, 0x0, 0x0)
	/home/travis/gopath/src/github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb/file.go:157 +0x3d5 fp=0xc0240006b0 sp=0xc024000610 pc=0x6dcfb5
github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb.(*Reader).traverse.func1(0x0, 0xbdbcf8, 0x0, 0x0)
	/home/travis/gopath/src/github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb/file.go:157 +0x3d5 fp=0xc024000750 sp=0xc0240006b0 pc=0x6dcfb5
github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb.(*Reader).traverse.func1(0x0, 0xbdbcf8, 0x0, 0x0)
	/home/travis/gopath/src/github.com/richardlehane/siegfried/vendor/github.com/richardlehane/mscfb/file.go:157 +0x3d5 fp=0xc0240007f0 sp=0xc024000750 pc=0x6dcfb5


Ability to modify content in a stream

I'm in the middle of trying to transition some code that I have written in C/C++ over to go and one of the pieces that I have is something that will go into the file and turn off macros in .doc files so as to make them safer to process in ms word. In order to do this, I merely go into the doc file and flip the length of the micro section to be 0 so that word no longer picks up the macros.

To enable this in go I would need the ability to be able to modify streams. I'm wondering if you would be open to the idea of having File object allow overwriting (not appending as that sounds much more complicated).

How To Ouptput doc worddocuemt sector?

as you code

if entry.Name == "WordDocument" {
	fmt.Println(buf[:i])
        fmt.Println(string(buf[:i]))
}

will output unknow code ,

I expect output person read string or text

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.